Thread (1 message) 1 message, 1 author, 2016-06-15

Re: 2 questions/nits about commit and config

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:18

Junio C Hamano [off-list ref] 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...".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help