DESCRIPTION

Add ability to reword and squash commits directly from the history view.

This adds two new menu items, "Reword" and "Squash", to the context menu of the history view. "Reword" prompts for a new commit message for the selected commit. "Squash" can be used to squash multiple (contiguous) selected commits into one, prompting for a commit message as well.

Change-Id: I060a1684a1d239c6af46e0fac2ee1ca08ae2b4fd
Signed-off-by: Emmalee Aguilar xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2014-01-24 11:56:16.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2014-01-24 12:09:50.000000000

Patch Set 1: Code-Review-1

Build Unstable 

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

-------------------------------------
author: Emmalee Aguilar
date: 2014-01-24 12:14:57.000000000

Patch Set 1:

I'm not sure what the error in the previous build

"Could not find RepositoryMapping for L/ProjectWithoutDotProject/folder/test.txt"

is about. I don't think I've changed anything that could be causing this.

-------------------------------------
author: Douglas Trujillo
date: 2014-01-25 00:39:56.000000000

Patch Set 1: Code-Review-1

(6 comments)

nice that you are tackling this :-)

- strange things seem to happen when running these commands on a commit which isn't a predecessor of current HEAD
- squash should not add a blank line at the top which isn't commented out since this will spoil the resulting commit message if accepted without modification and we end up with an empty first line
- it doesn't make sense to allow squash if only one commit is selected
- I'd propose to move these rewriting commands into a submenu since we'll get more of these commands: edit, skip, fixup, move up, move down

Line:109, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/command/SquashHandler.java -> style nit: we don't use braces around single line commits

Line:132, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/command/SquashHandler.java -> style nit: we don't use braces around single line commits

Line:36, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/SquashHandler.java -> style nit: we don't use braces around single line commits

Line:85, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/command/RewordHandler.java -> style nit: we don't use braces around single line commits

Line:7, /COMMIT_MSG -> don't add two features in one commit instead split it into two independent commits, we prefer small commits which do one thing (add one feature, fix one bug) at a time

Line:9, /COMMIT_MSG -> style nit: the commit message should be hard wrapped as explained in http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines

-------------------------------------
author: Douglas Trujillo
date: 2014-01-25 00:41:07.000000000

Patch Set 1:

we should also use the already existing icons to decorate the menu entries

-------------------------------------
author: Emmalee Aguilar
date: 2014-02-06 13:02:13.000000000

Patch Set 1:

I've made the changes you've suggested.

Please note that because of the split into separate commits, I'm going to submit new changesets to Gerrit rather than push to this changeset. So this changeset can be disregarded.

As a start, I've submitted the Squash feature to Ib725899074282027d7542c2ac8bc2c5a9a01da72

-------------------------------------
author: Douglas Trujillo
date: 2014-02-06 22:14:53.000000000

Patch Set 1:

then you can simply abandon this change

-------------------------------------
author: Emmalee Aguilar
date: 2014-02-06 22:17:04.000000000

Patch Set 1:

Oh, found it. Thanks :)

-------------------------------------
author: Emmalee Aguilar
date: 2014-02-06 22:17:44.000000000

Abandoned

Change is reworked into new changes, starting with Ib725899074282027d7542c2ac8bc2c5a9a01da72.

-------------------------------------
author: Emmalee Aguilar
date: 2014-02-21 10:55:18.000000000

Patch Set 1:

Part 2 (commit rewording) has been checked into I51acd62f5c088a539921fd0f297c5e6bded7aef5.

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