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

Re: [PATCH] Allow selection of different cleanup modes for commit messages

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2007, 19:41 UTC
Message-ID
<7vprwywm9c.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.0.9999.0712221107240.21557@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 19 quoted lines
> On Sat, 22 Dec 2007, Alex Riesen wrote:
>>
>> +	if (!no_edit) {
>
> This is unrelated to the rest of the patch, but I do think double 
> negations are horrible, so I thoink we should probably make the "no_edit" 
> flag change meaning, and call it "run_editor" or something.
> ...
> So I wonder if we should perhaps:
>
>  (a) Only add these messages at all when we do *not* do CLEANUP_ALL
> ...
>  (b) Add a a new line to replace he "will not be included" message, ie
> ...
> I personally would prefer (a) - since anybody who then explicitly uses
> --cleanup={space|none} would presumably already know what he is doing.
>
> But this is not a huge deal. Regardless, the patch looks ok, so you can 
> add a "Acked-by:" from me.

I was composing essentially the same message, except my preference was (as you can guess by the fact that I hinted the additional instruction) (b), but I agree that (a) is better at least for now because the user has to ask for verbatim every time (i.e. there is no config).

By the way, the "if (!no_edit)" conditional itself you quoted above as the first thing in your message is not needed at all. If no_edit is set, the function already has returned and we would not reach that point.

So a third round?
Previous: Linus TorvaldsNext: Junio C Hamano
Message 21 of 23 in “git-commit: add --verbatim to allow unstripped commit messages”
  1. git-commit: add --verbatim to allow unstripped commit messagesAlex Riesen, Dec 20, 2007
  2. Linus TorvaldsDec 20, 2007
  3. Alex RiesenDec 20, 2007
  4. git-commit: add --verbatim to allow unstripped commit messagesAlex Riesen, Dec 20, 2007
  5. Only filter "#" comments from commits if the editor is usedAlex Riesen, Dec 20, 2007
  6. Junio C HamanoDec 20, 2007
  7. Alex RiesenDec 20, 2007
  8. Junio C HamanoDec 20, 2007
  9. Fix thinko in checking for commit message emptinessAlex Riesen, Dec 20, 2007
  10. Linus TorvaldsDec 20, 2007
  11. Björn SteinbrinkDec 21, 2007
  12. Linus TorvaldsDec 21, 2007
  13. Junio C HamanoDec 20, 2007
  14. Linus TorvaldsDec 21, 2007
  15. Allow selection of different cleanup modes for commit messagesAlex Riesen, Dec 21, 2007
  16. Junio C HamanoDec 21, 2007
  17. Allow selection of different cleanup modes for commit messagesAlex Riesen, Dec 21, 2007
  18. Junio C HamanoDec 22, 2007
  19. Allow selection of different cleanup modes for commit messagesAlex Riesen, Dec 22, 2007
  20. Linus TorvaldsDec 22, 2007
  21. Junio C HamanoDec 22, 2007
  22. Junio C HamanoDec 23, 2007
  23. Junio C HamanoDec 23, 2007

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.