chiark / gitweb /
Test suite: Filter out .../git-core from PATH so that we catch git-foo
[dgit.git] / tests / lib-core
index f3881ca561c008c407ca24755cdc9facce646039..b01a6eae5cda188dde8700bc7e621998319309d8 100644 (file)
@@ -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"
+}