DESCRIPTION

[gitflow] feature finish squash should allow changing the commit message

- open standard commit dialog to amend squashed commit
- added UI test for feature finish squash

Bug: 473550
Change-Id: I028a05f21c7ca3f3a501dba160a3ed4ff035c87b
Signed-off-by: Jamarion Hunt xxx@xxx.xxx

COMMENTS

author: Jamarion Hunt
date: 2015-07-25 09:23:54.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2015-07-25 09:24:00.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2015-07-25 09:45:40.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/7347/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2015-07-25 13:57:09.000000000

Patch Set 3:

- why do you want to allow to amend the squashed commit ?
- I expected to get a dialog which allows to edit the squashed commit message only like if you select the squash or reword action on changes in interactive rebase

see org.eclipse.egit.ui.internal.commit.command.SquashHandler

do you check on "Finish feature" with squash that none of the files being squashed is dirty ? If there is a dirty file which also changed in the commits being squashed we should raise a dialog using UIRepositoryUtils.handleUncommittedFiles(), like in SquashHandler.

-------------------------------------
author: Jamarion Hunt
date: 2015-07-25 15:28:59.000000000

Patch Set 3:

> why do you want to allow to amend the squashed commit ?

The one thing I was missing previously was Repository::readSquashCommitMsg but now I think I can handle it differently.
However, there are two issues:
- CommitMessageEditorDialog has "Interactive Rebase" in its title, and I cannot change it programmatically
- The CommitDialog has the advantage that it allows to use the "add change-id" and "sign-off" which I use heavily in combination wit Gitflow

> do you check on "Finish feature" with squash that none of the files being squashed is dirty ?

Not yet, but I should.
I can amend the parent commit or fix it in a separate patch set. Which do you prefer?

-------------------------------------
author: Douglas Trujillo
date: 2015-07-25 20:40:57.000000000

Patch Set 3:

> > why do you want to allow to amend the squashed commit ?
 > 
 > The one thing I was missing previously was Repository::readSquashCommitMsg
 > but now I think I can handle it differently.
 > However, there are two issues:
 > - CommitMessageEditorDialog has "Interactive Rebase" in its title,
 > and I cannot change it programmatically

you could add another parameter "title" to its constructor in order to allow configuring the title

 > - The CommitDialog has the advantage that it allows to use the "add
 > change-id" and "sign-off" which I use heavily in combination wit
 > Gitflow
 
ok. These two actions are also missing for interactive rebase's reword and squash.
What are you using change-id for ? Or do you use git-flow with Gerrit ?

We could change CommitMessageEditorDialog to use CommitMessageComponent instead of SpellcheckableMessageArea in order to enable setting sign-off and change-id for squashing during rebase interactive, squashing from history view and squash merging from git-flow's "feature finish" with the squash option.

What feels wrong with using the commit dialog for this purpose ist that it shows an empty useless file-list for the squash cases.

 > > do you check on "Finish feature" with squash that none of the
 > files being squashed is dirty ?
 > 
 > Not yet, but I should.
yes, that's important

 > I can amend the parent commit or fix it in a separate patch set.
 > Which do you prefer?

I would prefer to amend the parent commit

-------------------------------------
author: Jamarion Hunt
date: 2015-07-26 12:03:09.000000000

Patch Set 3:

> you could add another parameter "title" to its constructor in order
 > to allow configuring the title

Done.

 > ok. These two actions are also missing for interactive rebase's
 > reword and squash.
 > What are you using change-id for ? Or do you use git-flow with
 > Gerrit ?

Yes. See 468885
It is the main reason for me to implement the squash option for feature finish.

 > We could change CommitMessageEditorDialog to use CommitMessageComponent
 > instead of SpellcheckableMessageArea in order to enable setting
 > sign-off and change-id for squashing during rebase interactive,
 > squashing from history view and squash merging from git-flow's
 > "feature finish" with the squash option.

I'll file a new enhancement request.
 
 > What feels wrong with using the commit dialog for this purpose ist
 > that it shows an empty useless file-list for the squash cases.
 > 
 > > > do you check on "Finish feature" with squash that none of the
 > > files being squashed is dirty ?
 > >
 > > Not yet, but I should.
 > yes, that's important

Done.

 > 
 > > I can amend the parent commit or fix it in a separate patch set.
 > > Which do you prefer?
 > 
 > I would prefer to amend the parent commit

Done.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2015-08-16 13:30:26.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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