Next: , Previous: , Up: FAQ - Issues and Errors   [Contents][Index]

A.2.11 My Git hooks work on the command-line but not inside Magit

When Magit calls git it adds a few global arguments including --literal-pathspecs and the git process started by Magit then passes that setting on to other git process it starts itself. It does so by setting the environment variable GIT_LITERAL_PATHSPECS, not by calling subprocesses with the --literal-pathspecs. You can therefore override this setting in hook scripts using unset GIT_LITERAL_PATHSPECS.