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

Re: git-rebase -i prunes commits with empty commit-message

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:48:24

Erik Faye-Lund wrote:
I'm in the process of converting an SVN repo to Git, and in the
process I found one quite disturbing feature of
git-rebase--interactive.sh: It discards commits with empty commit
messages!

Here's a recepie for reproducing the issue:
--->8---
git init
git commit -m "dummy" --allow-empty
git commit -m "dummy" --allow-empty
git commit -m "dummy" --allow-empty
git filter-branch -f --msg-filter 'sed -e "s/dummy//"'
git rebase -i HEAD~2
--->8---
Does git really claim to handle commits with empty commit messages?
That you have to use git-filter-branch to create the test case suggests
that the answer is "no", but I don't know.  (git-commit, for example,
refuses to create a commit with an empty message.)

If indeed git requires commit messages to be non-empty, then the fault
here seemingly lies with git-filter-branch for allowing commit messages
to be completely deleted.

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