Skip to content

Commit fca2d86

Browse files
peffgitster
authored andcommitted
t/interop: report which vanilla git command failed
The interop test library sets up wrappers "git.a" and "git.b" to represent the two versions to be tested. It also wraps vanilla "git" to report an error, with the goal of catching tests which accidentally fail to use one of the version-specific wrappers (which could invalidate the tests in a very subtle way). But when it catches an invocation of vanilla git, it doesn't give any details, which makes it very hard to debug exactly which invocation is responsible (especially if it's buried in a function invocation, etc). Let's report the arguments passed to git, which helps narrow it down. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c48035d commit fca2d86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/interop/interop-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ generate_wrappers () {
6868
wrap_git .bin/git.a "$DIR_A" &&
6969
wrap_git .bin/git.b "$DIR_B" &&
7070
write_script .bin/git <<-\EOF &&
71-
echo >&2 fatal: test tried to run generic git
71+
echo >&2 fatal: test tried to run generic git: $*
7272
exit 1
7373
EOF
7474
PATH=$(pwd)/.bin:$PATH

0 commit comments

Comments
 (0)