Re: Using git commit --amend on a commit with an empty message

2012-07-09 Thread Chris Webb
Junio C Hamano writes: > Yeah, it is a "bug" that exists only because nobody sane uses empty > message commits, let alone tries to amend such commits, hence went > unnoticed for a long time. Quite. I only noticed it because this is the default behaviour of Github gists and I wanted to replace th

Re: Using git commit --amend on a commit with an empty message

2012-07-09 Thread Junio C Hamano
Chris Webb writes: > In fact, we even fail to start the editor if --allow-empty-message is > explicitly provided: > > $ git commit --allow-empty --allow-empty-message -m '' > $ git commit --amend --allow-empty-message > fatal: commit has empty message > > Assuming this isn't intentional for

Using git commit --amend on a commit with an empty message

2012-07-09 Thread Chris Webb
Github gists can be cloned as normal git repositories, but the commits made through the web interface appear with an empty commit message. Running git commit --amend against them exposes a slightly odd behaviour of git, which I can also demonstrate as follows: $ git init foo && cd foo $ touch