git diff from a pre-commit hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux