git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Chris Webb <chris@arachsys.com>
Date
Jul 9, 2012, 18:17 UTC
Message-ID
<20120709181754.GE23859@arachsys.com>
In-Reply-To
<7v7guclucl.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> 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 the empty commit messages with more meaningful ones.

> The patch looks sane; if we want to keep this as a feature or a
> bugfix, we may want to pretect it with a new test, though.

Yes, it's hardly something people will test often. Okay, I'll send a version two with a suitable test.

Best wishes,
Chris.
Previous: Junio C HamanoNext: Chris Webb
Message 3 of 5 in “Using git commit --amend on a commit with an empty message”
  1. Chris WebbJul 9, 2012
  2. Junio C HamanoJul 9, 2012
  3. Chris WebbJul 9, 2012
  4. Allow edit of empty message with commit --amendChris Webb, Jul 9, 2012
  5. Junio C HamanoJul 9, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.