Kaartic Sivaraam <kaarticsivaraam91...@gmail.com> writes:

> Sometimes I abort an commit from from the editor by providing an empty
> commit message. Then I came to know that 'git commit' considers commit
> messages with just signed-off-by lines as an empty message. I tried to
> take advantage of that. I once tried to abort a merge by just removing
> the "Merge ..." line and leaving the "Signed-off" line and was
> surprised to see the merge happen instead of an abort. The rest is
> history. :)

I think many people know about and do use the "delete all lines"
(i.e. ":1,$d" in vi, or \M-< \C-SPC \M-> \C-w in Emacs) to abort out
of a commit or a merge.  I just do not think it is likely for them
to leave Sign-off lines and remove everything else, which is more
work than to delete everything, hence my reaction.

Reply via email to