Bug 491467 - Commit command from Package Explorer/Navigator lost an importance piece of functionality
Summary: Commit command from Package Explorer/Navigator lost an importance piece of fu...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-11 15:06 EDT by Sergey Prigogin CLA
Modified: 2016-04-11 18:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2016-04-11 15:06:15 EDT
Consider a situation with two changed unstaged files, A.java and B.java. Until recently the Commit command invoked from the context menu of A.java displayed a Commit dialog with A.java checked and B.java unchecked. Now is brings up the Git Staging view, but both A.java and B.java are listed as unstaged. The user has to explicitly add A.java to index before creating the commit.

The Commit command invoked from a context menu of a file should automatically stage the file. It should probably also unstage all files that were staged previously but were not selected when Commit was invoked.
Comment 1 Matthias Sohn CLA 2016-04-11 18:19:49 EDT
(In reply to Sergey Prigogin from comment #0)
> Consider a situation with two changed unstaged files, A.java and B.java.
> Until recently the Commit command invoked from the context menu of A.java
> displayed a Commit dialog with A.java checked and B.java unchecked. Now is
> brings up the Git Staging view, but both A.java and B.java are listed as
> unstaged. The user has to explicitly add A.java to index before creating the
> commit.

you can still use the Commit Dialog by changing the preference
"Team > Git > Committing > Use Staging View to commit instead of Commit Dialog"

> The Commit command invoked from a context menu of a file should
> automatically stage the file. It should probably also unstage all files that
> were staged previously but were not selected when Commit was invoked.

When clicking "Commit..." the staging view should be shown and all unstaged files should be pre-selected. I didn't add more magic since I wasn't sure which magic the majority of our users would expect.

I think it could make sense to auto-stage the files selected when clicking "Commit...", but I think I would not want the not-selected files to be auto-unstaged since the staging view is non-modal and I always use it in an incremental way which isn't possible with the commit dialog, well since that's modal. Of course we could add more options to let users choose the behaviour they want.