Re: Bug: 'git ls-files' doesn't work on submodule in post-commit hook

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

 



Hi brian,

I checked it by replacing the printf line in my example with this one:
printf '#!/bin/bash\necho GIT_DIR is: $GIT_DIR\ncd git-submodulerepo\necho Git says my files are:\ngit ls-files\necho ---------------\necho Filesystem says my files are:\nls -w1\necho ---------------\n' > .git/hooks/post-commit

In both hooks, GIT_DIR is empty, so this shouldn't be the problem.
Thanks anyways.

On 2020-02-25 02:13, brian m. carlson wrote:
> Can you check to see if the GIT_DIR environment variable is set in your
> hook?  In some cases, Git sets various GIT_* environment variables when
> calling a hook or command, and if you want another repository, you'd
> need to unset those values.
> 



[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