1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-29 07:26:10 +02:00
git/templates
Alex Vandiver 6f1dc21d98 fsmonitor: read from getcwd(), not the PWD environment variable
Though the process has chdir'd to the root of the working tree, the
PWD environment variable is only guaranteed to be updated accordingly
if a shell is involved -- which is not guaranteed to be the case.
That is, if `/usr/bin/perl` is a binary, $ENV{PWD} is unchanged from
whatever spawned `git` -- if `/usr/bin/perl` is a trivial shell
wrapper to the real `perl`, `$ENV{PWD}` will have been updated to the
root of the working copy.

Update to read from the Cwd module using the `getcwd` syscall, not the
PWD environment variable.  The Cygwin case is left unchanged, as it
necessarily _does_ go through a shell.

Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-10 14:04:50 +09:00
..
.gitignore
Makefile
branches--
hooks--applypatch-msg.sample *.sh: avoid hardcoding $GIT_DIR/hooks/... 2014-12-01 11:00:13 -08:00
hooks--commit-msg.sample
hooks--fsmonitor-watchman.sample fsmonitor: read from getcwd(), not the PWD environment variable 2017-11-10 14:04:50 +09:00
hooks--post-update.sample
hooks--pre-applypatch.sample *.sh: avoid hardcoding $GIT_DIR/hooks/... 2014-12-01 11:00:13 -08:00
hooks--pre-commit.sample sample pre-commit hook: use --bool when retrieving config var 2013-09-24 12:26:49 -07:00
hooks--pre-push.sample pre-push.sample: remove unnecessary and misleading IFS=' ' 2014-12-22 10:27:42 -08:00
hooks--pre-rebase.sample treewide: correct several "up-to-date" to "up to date" 2017-08-23 12:17:22 -07:00
hooks--pre-receive.sample pre-receive.sample: mark it executable 2016-10-28 14:21:11 -07:00
hooks--prepare-commit-msg.sample hook: use correct logical variable 2017-08-14 11:19:50 -07:00
hooks--update.sample templates/hooks: fix minor typo in the sample update-hook 2016-02-25 09:32:20 -08:00
info--exclude
this--description