DESCRIPTION

Fix commit amend to show full commit when clicking "amend" option

In the Git Staging view, when editing an existing commit, it should be
possible to re-edit all details of a commit. This includes not only the
commit message, but also all file additions, modifications and
deletions. Therefore, the "Staged Changes" file list should list the
changes that happened in the commit that is being edited.

Bug: 353816
Bug: 459152
Bug: 490126
Change-Id: Idcd1efeeee8b3065bae36e285bfc0af24ab1e88f
Signed-off-by: Douglas Trujillo xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2016-07-13 09:33:25.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-07-13 09:33:31.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8841/

-------------------------------------
author: Brenden Conley
date: 2016-07-13 10:00:41.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/8841/ : UNSTABLE

-------------------------------------
author: Zaid Mosley
date: 2016-07-13 10:14:54.000000000

Patch Set 1: Code-Review+1

That is an awesome enhancement. Tested and it works well.

-------------------------------------
author: Douglas Trujillo
date: 2016-07-13 11:19:45.000000000

Patch Set 1:

> That is an awesome enhancement. Tested and it works well.

did you also try your favourite rebase interactive use cases which may also involve amending commits ?

-------------------------------------
author: Brenden Conley
date: 2016-07-13 11:20:05.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8843/

-------------------------------------
author: Brenden Conley
date: 2016-07-13 11:44:00.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/8843/ : UNSTABLE

-------------------------------------
author: Zaid Mosley
date: 2016-07-13 13:06:55.000000000

Patch Set 1: -Code-Review

> did you also try your favourite rebase interactive use cases

Not in the original test. Now I tried it and it does not work. If you commit should also support this in interactive rebase I would expect to see the committed files also in the "Staged Changes" view, if I edit one commit. But my "Staged Commit" is empty.

-------------------------------------
author: Douglas Trujillo
date: 2016-07-13 13:10:20.000000000

Patch Set 1:

> > did you also try your favourite rebase interactive use cases
 > 
 > Not in the original test. Now I tried it and it does not work. If
 > you commit should also support this in interactive rebase I would
 > expect to see the committed files also in the "Staged Changes"
 > view, if I edit one commit. But my "Staged Commit" is empty.

I tried some cases which worked for me. So can you provide steps to reproduce the problem you observed ?

-------------------------------------
author: Zaid Mosley
date: 2016-07-13 13:22:34.000000000

Patch Set 1:

My test was the following:

Interactive rebase, edit three commits.

First commit, remove the one file from the commit and press "Ignore commit" (as it had no changes anymore)

-> After that all follow up commits did not show anything in the Staging View (even though they changed files)

-------------------------------------
author: Douglas Trujillo
date: 2016-07-13 13:59:51.000000000

Patch Set 1: Verified-1

looks like the test failures are regressions caused by this change

-------------------------------------
author: Zachary Orozco
date: 2016-07-14 16:01:34.000000000

Patch Set 1:

(1 comment)

Line:1198, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> What I don't like is that the Reflog for the branch gets polluted. When I amend a commit on branch test1 then the Reflog gets one extra entry:

  xxx@xxx.xxx git reflog test
  cec2e97 xxx@xxx.xxx commit (amend): test1
  f37a26d xxx@xxx.xxx HEAD~: updating HEAD
  6aea04e xxx@xxx.xxx commit: test1
  f37a26d xxx@xxx.xxx branch: Created from branch refs/remotes/origin/master

Maybe you can prohibit the reflog entries.

-------------------------------------
