author | Gabriel Filion <lelutin@gmail.com> | |
Wed, 17 Feb 2010 04:18:50 +0000 (23:18 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 17 Feb 2010 18:55:12 +0000 (10:55 -0800) | ||
commit | ab62677b1424d4e53cf222c973b841d3dada4cf3 | |
tree | eea1673f92c67a29dfc94c016b31ba935936e473 | tree | snapshot |
parent | e90fdc39b6903502192b2dd11e5503cea721a1ad | commit | diff |
require_work_tree broken with NONGIT_OK
With NONGIT_OK set, require_work_tree function outside a git repository
gives a syntax error. This is caused by an incorrect use of "test" that
didn't anticipate $(git rev-parse --is-inside-work-tree) may return an
empty string.
Properly quote the argument to "test", and send the standard error stream
to /dev/null to avoid giving duplicate error messages.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
With NONGIT_OK set, require_work_tree function outside a git repository
gives a syntax error. This is caused by an incorrect use of "test" that
didn't anticipate $(git rev-parse --is-inside-work-tree) may return an
empty string.
Properly quote the argument to "test", and send the standard error stream
to /dev/null to avoid giving duplicate error messages.
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-sh-setup.sh | diff | blob | history |