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

[REQUEST] another --cleanup mode for commit

From
Christoph Anton Mitterer <calestyo@scientia.net>
Date
Feb 21, 2015, 17:48 UTC
Message-ID
<1424540911.15539.23.camel@scientia.net>
Hey.

Right now, all --cleanup modes for commit (except verbatim) seem to remove all "unnecessary" whitespace and collapse consecutive empty lines.

I use already vim to show me any such things and when I don't remove it then, this usually means I want to have it intentionally (especially consecutive empty lines).

Now obviously I could do things like --no-status, but I actually like the status to be shown - as I like it to be automatically removed. ;-)

So it would be great if one could have another cleanup mode which
basically does just the following:
- remove any trailing lines that start with # and the one newline (which
  is automatically added with the status) before these
  e.g.
    foo
    #bar
  
    #status
  yields in:
    foo
    #bar
  e.g.
    foo
    #bar
    #status
  yields in:
    foo
- apart form that, leave any whitespace, new lines, etc. as is

Cheers, Chris.

Message 1 of 1 in “[REQUEST] another --cleanup mode for commit”
  1. Christoph Anton MittererFeb 21, 2015

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.