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

Re: 2 questions/nits about commit and config

From
Junio C Hamano <junkio@cox.net>
Date
Feb 5, 2006, 05:58 UTC
Message-ID
<7vek2imjmt.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vu0bemkce.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
> Here is me thinking aloud again.

Before I started writing this message, I meant to address an excellent point Carl Worth raised in an earlier thread. "What would I do for final sanity check before committing?". So here is a follow-up.

>  - "git commit"
"git diff --cached HEAD".
>  - "git commit --include paths..." (or "git commit -i paths...")

This is for people who work by taking advantage of the power of the index file, i.e. perform "checking in without committing" by running update-index whenever the changes so-far look good. Combined use of "git diff --cached HEAD" (to look at diffs for paths other than paths...) and "git diff HEAD paths..." would be the _full_ "final sanity check", but in practice "git diff HEAD paths..." or even "git diff paths..." would be more useful for these people. They've verified the changes so-far were sane when they did update-index already.

>  - "git commit paths..." acquires a new semantics.  This is an
>    incompatible change that needs user training, which I am
>    still a bit reluctant to swallow, but enough people seem to
>    have complained.
"git diff HEAD paths...".
Previous: Junio C HamanoNext: Daniel Barkalow
Message 7 of 8 in “2 questions/nits about commit and config”
  1. Michael FischerFeb 4, 2006
  2. Junio C HamanoFeb 4, 2006
  3. Junio C HamanoFeb 4, 2006
  4. Alan ChandlerFeb 4, 2006
  5. Keith PackardFeb 4, 2006
  6. Junio C HamanoFeb 5, 2006
  7. Junio C HamanoFeb 5, 2006
  8. Daniel BarkalowFeb 5, 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.