From: Junio C Hamano Date: Sun, 05 Feb 2006 05:58:50 GMT Subject: Re: 2 questions/nits about commit and config Message-ID: <7vek2imjmt.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <7vu0bemkce.fsf@assigned-by-dhcp.cox.net> Junio C Hamano 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...".