From: Junio C Hamano Date: Thu, 21 Feb 2008 20:56:52 GMT Subject: Re: [PATCH] Fix amending of a commit with an empty message Message-ID: <7vmyput4dn.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080221203802.GB20143@steel.home> Alex Riesen writes: > In this one. I am a bit unsure regarding the change (it looks a little > too strong), even though it passes the test suite. I think that is because your new test is faulty. Instead of ':' I complained about, try having "echo foo" there. I think it will still fail. So your test failure is not about "a commit with an empty message" at all. Look at the previous test and how we allow an empty commit (not "with empty message", but "with the same tree as its sole parent") to be made and amended. Having said that, here is a quiz. When the user says "git commit --amend", what are the valid reasons not to allow it, other than: - the index is unmerged. - the branch is yet to be born.