summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib2
-rw-r--r--tests/lib-core11
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib b/tests/lib
index 6401f93..275d3ef 100644
--- a/tests/lib
+++ b/tests/lib
@@ -21,6 +21,8 @@ END
trap 'test $? = 0 || t-report-failure' EXIT
+t-filter-out-git-hyphen-dir
+
t-set-intree
: ${DGIT_TEST_DEBUG=-D}
diff --git a/tests/lib-core b/tests/lib-core
index f3881ca..b01a6ea 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"
+}