Bug 445768 - [stagingView] "Commit and Push" button should not be available during rebase
Summary: [stagingView] "Commit and Push" button should not be available during rebase
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2014-10-02 09:36 EDT by Jérôme de Vivie CLA
Modified: 2014-10-09 05:44 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme de Vivie CLA 2014-10-02 09:36:53 EDT
Hi,

While doing a rebase (repo in "Rebase interactive" state), buttons "Commit and Push" and "Commit" are available on "Git staging" view.

So, a rebase in progress can accidentally be conclude with a commit operation.

Would it be possible to hide these buttons during a rebase ? Thank you

BR
Jérôme
Comment 1 Robin Stocker CLA 2014-10-03 00:29:47 EDT
(In reply to Jérôme de Vivie from comment #0)
> While doing a rebase (repo in "Rebase interactive" state), buttons "Commit
> and Push" and "Commit" are available on "Git staging" view.

I agree that "Commit and Push" should be disabled.

"Commit" on the other hand can be valid during a rebase (C Git also handles it fine). I adjusted the title.
Comment 2 Jérôme de Vivie CLA 2014-10-03 05:36:36 EDT
Even if it is possible with C Git, i do not find a valid reason to do a commit during a rebase. If someone wants to keep already rebased commits, he can do a "rebase --skip".
Comment 3 Matthias Sohn CLA 2014-10-03 19:42:20 EDT
Commit during rebase makes sense if you want to add a new commit during interactive rebase:

let's assume your interactive rebase plan looks initially like this

reword     feature A
edit       feature B

and let's assume you want to improve feature A's commit message and improve feature B by first doing a refactoring you want to put into it's own new commit so after having
reworded the first commit you want add the refactoring in it's own commit and then put feature B on top (which needs to be modified to make use of the refactoring

reword     feature A
new commit refactoring for feature B
edit       feature B
Comment 4 Jérôme de Vivie CLA 2014-10-07 08:21:15 EDT
(In reply to Matthias Sohn from comment #3)
> Commit during rebase makes sense if you want to add a new commit during
> interactive rebase

I agree with you. So my wish concerns only non interactive rebase.
Comment 5 Matthias Sohn CLA 2014-10-08 05:44:56 EDT
(In reply to Jérôme de Vivie from comment #4)
> (In reply to Matthias Sohn from comment #3)
> > Commit during rebase makes sense if you want to add a new commit during
> > interactive rebase
> 
> I agree with you. So my wish concerns only non interactive rebase.

But also during a non-interactive rebase which stops on a conflict I may want to insert a new commit, I think that's why native git also allows to do that
Comment 6 Jérôme de Vivie CLA 2014-10-09 05:44:31 EDT
(In reply to Matthias Sohn from comment #5)
> (In reply to Jérôme de Vivie from comment #4)
> > (In reply to Matthias Sohn from comment #3)
> > > Commit during rebase makes sense if you want to add a new commit during
> > > interactive rebase
> > 
> > I agree with you. So my wish concerns only non interactive rebase.
> 
> But also during a non-interactive rebase which stops on a conflict I may
> want to insert a new commit, I think that's why native git also allows to do
> that

Here, the new commit was not planned. It is inserted because a conflict happened (non-functional reason). I found this weird.

Accidental commit during a non-interactive is quite more common, don't you think so ?