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

[PATCH 0/3] "commit --template" fixes

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 30, 2012, 19:45 UTC
Message-ID
<1333136719-12657-1-git-send-email-gitster@pobox.com>
In-Reply-To
<7vaa2ylzrm.fsf@alter.siamese.dyndns.org>

When the user exited editor without editing the commit log template given by "git commit -t <template>", the commit was aborted (correct) with an error message that said "due to empty commit message" (incorrect). The goal of this series is to fix this, which is the third patch.

While looking at this, I found another bug that the contents of the template file is still used for error checking even when it is ignored when the editor is populated for the user to edit. The second patch addresses this.

Junio C Hamano (3):
  t7501: test the right kind of breakage
  commit: do not trigger bogus "has templated message edited" check
  commit: rephrase the error when user did not touch templated log message
 builtin/commit.c  |   62 +++++++++++++++++++++++++++++++++++++----------------
 t/t7501-commit.sh |   14 ++++++++++++
 2 files changed, 57 insertions(+), 19 deletions(-)
-- 
1.7.10.rc3.55.g06e99
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 19 in “git-commit doc: say -t requires editing commit message”
  1. git-commit doc: say -t requires editing commit messageAdam Monsen, Mar 29, 2012
  2. Ivan HeffnerMar 29, 2012
  3. git-commit.txt: clarify -t requires editing messageAdam Monsen, Mar 29, 2012
  4. Junio C HamanoMar 30, 2012
  5. Adam MonsenMar 30, 2012
  6. Junio C HamanoMar 30, 2012
  7. Adam MonsenMar 30, 2012
  8. Junio C HamanoMar 30, 2012
  9. Adam MonsenMar 30, 2012
  10. Junio C HamanoMar 30, 2012
  11. 0/3 "commit --template" fixesJunio C Hamano, Mar 30, 2012
  12. 1/3 t7501: test the right kind of breakageJunio C Hamano, Mar 30, 2012
  13. 2/3 commit: do not trigger bogus "has templated message edited" checkJunio C Hamano, Mar 30, 2012
  14. 3/3 commit: rephrase the error when user did not touch templated log messageJunio C Hamano, Mar 30, 2012
  15. Adam MonsenMar 31, 2012
  16. Junio C HamanoApr 1, 2012
  17. Adam MonsenApr 3, 2012
  18. Junio C HamanoApr 3, 2012
  19. Adam MonsenApr 5, 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.