git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git diff from a pre-commit hook
@ 2020-02-17  9:00 Michael Strelnikov
  0 siblings, 0 replies; only message in thread
From: Michael Strelnikov @ 2020-02-17  9:00 UTC (permalink / raw)
  To: git

Hello,

   I'm trying to implement the pre-commit hook and faced a problem.
   1. If I just run command "git diff --staged --name-only
--diff-filter=A" I get an error: "fatal: unable to read [SHA]"
   2. After searching for solutions I found that for a pre-commit hook
I have to re-set the GIT_INDEX_FILE variable to ".git/index". After
doing that I see that diff is not honoring the "info/exclude"
settings.

Is there anything else I need to set to make diff working properly?

Best regards,
Michael Strelnikov

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-17  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17  9:00 git diff from a pre-commit hook Michael Strelnikov

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).