X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib-core;h=b01a6eae5cda188dde8700bc7e621998319309d8;hb=70dbab26df688289afccf257188267afb3594d16;hp=f3881ca561c008c407ca24755cdc9facce646039;hpb=d228327cc4aec6fef736c5d44abb0edf025a57f0;p=dgit.git diff --git a/tests/lib-core b/tests/lib-core index f3881ca5..b01a6eae 100644 --- a/tests/lib-core +++ b/tests/lib-core @@ -21,3 +21,14 @@ t-set-using-tmp () { export DGIT_TEST_TMP=$tmp export GNUPGHOME=$tmp/gnupg } + +t-filter-out-git-hyphen-dir () { + local pathent=$(type -p git-rev-parse ||:) + case "$pathent" in '') return ;; esac + pathent=${pathent%/*} + local path=":$PATH:" + path="${path//:$pathent:/}" + path="${path#:}" + path="${path%:}" + PATH="$path" +}