Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit (2.1~~) unstable; urgency=medium
* git- prefixes: Fix some occurrences of `git-foo' in infrastructure,
dgit (2.1~~) unstable; urgency=medium
* git- prefixes: Fix some occurrences of `git-foo' in infrastructure,
- messages, and test suite.
+ messages, and test suite. Filter out .../git-core from PATH in
+ test suite so that we catch future occurrences.
trap 'test $? = 0 || t-report-failure' EXIT
trap 'test $? = 0 || t-report-failure' EXIT
+t-filter-out-git-hyphen-dir
+
t-set-intree
: ${DGIT_TEST_DEBUG=-D}
t-set-intree
: ${DGIT_TEST_DEBUG=-D}
export DGIT_TEST_TMP=$tmp
export GNUPGHOME=$tmp/gnupg
}
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"
+}