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

Re: git-commit: select which files to commit while editing the commit message

From
Junio C Hamano <junkio@cox.net>
Date
Dec 8, 2006, 19:18 UTC
Message-ID
<7vpsaui4cn.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<loom.20061208T131919-178@post.gmane.org>
Pazu <pazu@pazu.com.br> writes:
Show 14 quoted lines
> # Please enter the commit message for your changes.
> # (Comment lines starting with '#' will not be included)
> # On branch refs/heads/next
> # Updated but not checked in:
> #   (will commit)
> #
> #	modified:   perl/Makefile
> #	modified:   var.c
>
> Here's where the magic would happen. Removing the line "modified: var.c" would
> remove var.c from this commit. Of course, the template message should be
> modified to tell the user he can do that.
>
> So, what do you think about this?

Personally, I would refuse to use such a modified git, because often the first thing I would do in the commit log buffer is check the listed files and remove the '# ...' lines while typing. I do not want that to affect the set of changes I staged in any way.

But maybe that is just me.
Previous: PazuNext: Sean
Message 2 of 3 in “git-commit: select which files to commit while editing the commit message”
  1. PazuDec 8, 2006
  2. Junio C HamanoDec 8, 2006
  3. SeanDec 9, 2006

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.