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

Re: [PATCH] commit: remove irrelavent prompt on `--allow-empty-message`

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jul 7, 2021, 04:37 UTC
Message-ID
<60e52f945507_2fe63d2088c@natae.notmuch>
In-Reply-To
<xmqqlf6jla5o.fsf@gitster.g>
Junio C Hamano wrote:
Show 14 quoted lines
> Hu Jialun <hujialun@comp.nus.edu.sg> writes:
> 
> > Currently, COMMIT_EDITMSG contains "...and an empty message aborts the
> > commit", regardless of whether the --allow-empty-message option is
> > specified or not. This is deemed confusing and unintended.
> 
> I have to wonder what reason a user have to use that option, other
> than wanting to record a commit without any message.  In other words,
> wouldn't it be a bug for this command 
> 
>     $ git commit --allow-empty-message
> 
> to open an editor to allow editing the message, instead of just
> committing with an empty message?
To translate this question into more programmatical terms.
Should this commit an empty message?
  % git commit --allow-empty-message -m "$msg"
I say the answer is no.
We need to know what the message is.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Hu Jialun
Message 3 of 20 in “commit: remove irrelavent prompt on `--allow-empty-message`”
  1. commit: remove irrelavent prompt on `--allow-empty-message`Hu Jialun, Jul 6, 2021
  2. Junio C HamanoJul 6, 2021
  3. Felipe ContrerasJul 7, 2021
  4. Hu JialunJul 7, 2021
  5. Hu JialunJul 7, 2021
  6. 1/2 commit: reorganise duplicate commit prompt stringsHu Jialun, Jul 7, 2021
  7. Đoàn Trần Công DanhJul 7, 2021
  8. Junio C HamanoJul 7, 2021
  9. 2/2 commit: remove irrelavent prompt on `--allow-empty-message`Hu Jialun, Jul 7, 2021
  10. Felipe ContrerasJul 7, 2021
  11. Hu JialunJul 8, 2021
  12. Đoàn Trần Công DanhJul 8, 2021
  13. Junio C HamanoJul 8, 2021
  14. 1/2 commit: reorganise commit hint stringsHu Jialun, Jul 9, 2021
  15. Junio C HamanoJul 9, 2021
  16. 2/2 commit: remove irrelavent prompt on `--allow-empty-message`Hu Jialun, Jul 9, 2021
  17. Junio C HamanoJul 9, 2021
  18. Hu JialunJul 10, 2021
  19. Hu JialunJul 22, 2021
  20. Junio C HamanoJul 22, 2021

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.