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

Re: [PATCH] commit & merge: modularize the empty message validator

From
Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Date
Jul 13, 2017, 13:00 UTC
Message-ID
<1499950837.2427.1.camel@gmail.com>
In-Reply-To
<xmqq8tju3eqp.fsf@gitster.mtv.corp.google.com>
On Tue, 2017-07-11 at 13:22 -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Having said all that, I am not sure "Prevent such surprises" is a
> problem that is realistic to begin with.  When a user sees the
> editor buffer in "git merge", it is pre-populated with at least a
> single line of message "Merge branch 'foo'", possibly followed by
> the summary  the side branch being merged, so unless the user
> deliberately removes everything and then add a sign-off line
> (because we do not usually add one), there is no room for "such
> surprises" in the first place.  It does not _hurt_ to diagnose such
> a crazy case, but it feels a bit lower priority.
> 

It's little unfortunate that I haven't mentioned the reason I asked the question that has resulted in this patch. It would explain a little about why I thought this wasn't "meh" (I hope it stands for "who care what ever").

Sometimes I abort an commit from from the editor by providing an empty commit message. Then I came to know that 'git commit' considers commit messages with just signed-off-by lines as an empty message. I tried to take advantage of that. I once tried to abort a merge by just removing the "Merge ..." line and leaving the "Signed-off" line and was surprised to see the merge happen instead of an abort. The rest is history. :)

-- 
Kaartic
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 24 in “Why doesn't merge fail if message has only sign-off?”
  1. Kaartic SivaraamJul 2, 2017
  2. Junio C HamanoJul 3, 2017
  3. Kaartic SivaraamJul 4, 2017
  4. merge-message: change meaning of "empty merge message"Kaartic Sivaraam, Jul 6, 2017
  5. Kevin DaudtJul 6, 2017
  6. Kaartic SivaraamJul 6, 2017
  7. commit & merge: modularize the empty message validatorKaartic Sivaraam, Jul 11, 2017
  8. Kaartic SivaraamJul 11, 2017
  9. Junio C HamanoJul 11, 2017
  10. Kaartic SivaraamJul 13, 2017
  11. Junio C HamanoJul 13, 2017
  12. Kaartic SivaraamJul 14, 2017
  13. Christian BrabandtJul 17, 2017
  14. Junio C HamanoJul 17, 2017
  15. Kaartic SivaraamJul 13, 2017
  16. Junio C HamanoJul 13, 2017
  17. Kaartic SivaraamJul 14, 2017
  18. Kaartic SivaraamJul 15, 2017
  19. branch: change the error messages to be more meaningfulKaartic Sivaraam, Aug 21, 2017
  20. Kaartic SivaraamAug 21, 2017
  21. commit: change the meaning of an empty commit messageKaartic Sivaraam, Aug 21, 2017
  22. Junio C HamanoAug 24, 2017
  23. Kaartic SivaraamAug 31, 2017
  24. Kaartic SivaraamOct 2, 2017

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.