Thread (11 messages) flat view 11 messages, 5 authors, 2016-06-15

Re: [PATCH 0/3] Add a "fix" command to "rebase --interactive"

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:47:49

Michael Haggerty [off-list ref] wrote:
This patch series adds "fix" to the commands that can be used within
the "rebase --interactive" patch editor.  "fix" is like "squash"
except that it discards the log message of the corresponding commit.
...
But sometimes I don't have my head-slapping moments until a few
commits later.  In this case, my usual practice is to commit the
trivial typo change on top of the current branch, then "rebase
--interactive" to move the typo fix on top of the erroneous commit and
squash it:
...
pick 05d3b81 Commit with typo
squash 5eb3299 Fix for typo
pick c29114a Good commit 1
pick 250b013 Good commit 2
+1 for fix.  Totally.

When developing I *often* have not just 1 to squash, but 10 or so
in a single rebase -i session, all with useless commit messages like
"a", "s", or "foo".  Given that I also have a commit-msg hook which
injects additional lines into each of those messages, squash can be
annoying to use...

fix would be really cool.  To be honest, its my most common use
of squash... to use the first commit's message, but combine in the
misc. idiot fixes I've collected since I wrote that commit.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help