Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Junio C Hamano
Stefan Beller writes: > plumbing command, so the likelihood of git-log calls in scripts out > there is high. > > So maybe the community should strive to be more aggressive about > changing the porcelain interface for the better. To me, these two paragraphs are being incoherent. If plumbing

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Stefan Beller
On Thu, May 31, 2018 at 4:09 PM, Robert P. J. Day wrote: > On Fri, 1 Jun 2018, Johannes Sixt wrote: > >> Am 31.05.2018 um 19:27 schrieb Robert P. J. Day: >> > On Thu, 31 May 2018, Duy Nguyen wrote: >> >> git diff-index is "plumbing", designed for writing scripts. "git >> >> diff" on the other

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Robert P. J. Day
On Fri, 1 Jun 2018, Johannes Sixt wrote: > Am 31.05.2018 um 19:27 schrieb Robert P. J. Day: > > On Thu, 31 May 2018, Duy Nguyen wrote: > >> git diff-index is "plumbing", designed for writing scripts. "git > >> diff" on the other hand is for users and its behavior may change > >> even if it breaks

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Johannes Sixt
Am 31.05.2018 um 19:27 schrieb Robert P. J. Day: On Thu, 31 May 2018, Duy Nguyen wrote: git diff-index is "plumbing", designed for writing scripts. "git diff" on the other hand is for users and its behavior may change even if it breaks backward compatibility. ah, this was a philosophical

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Duy Nguyen
On Thu, May 31, 2018 at 7:27 PM, Robert P. J. Day wrote: > On Thu, 31 May 2018, Duy Nguyen wrote: > >> On Thu, May 31, 2018 at 6:38 PM, Robert P. J. Day >> wrote: >> > >> > was going over some hooks and writing some tutorials for some of >> > the commit-related, client-side hooks, and was

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Robert P. J. Day
On Thu, 31 May 2018, Duy Nguyen wrote: > On Thu, May 31, 2018 at 6:38 PM, Robert P. J. Day > wrote: > > > > was going over some hooks and writing some tutorials for some of > > the commit-related, client-side hooks, and was wondering (perhaps > > stupidly) why the pre-commit.sample hook uses,

Re: is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Duy Nguyen
On Thu, May 31, 2018 at 6:38 PM, Robert P. J. Day wrote: > > was going over some hooks and writing some tutorials for some of the > commit-related, client-side hooks, and was wondering (perhaps > stupidly) why the pre-commit.sample hook uses, as its last line: > > exec git diff-index --check

is there a reason pre-commit.sample uses "git diff-index"?

2018-05-31 Thread Robert P. J. Day
was going over some hooks and writing some tutorials for some of the commit-related, client-side hooks, and was wondering (perhaps stupidly) why the pre-commit.sample hook uses, as its last line: exec git diff-index --check --cached $against -- ^^ as in, could this not