Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2015-10-30 22:02:56 +0300
committerJunio C Hamano <gitster@pobox.com>2015-10-31 00:02:38 +0300
commit6a94088cc3d539bdc15b824befc083f7ff8d0288 (patch)
tree8f0cfd83cf10d042726e0b706c5fd5636dfc6388 /wrap-for-bin.sh
parent80980a1d5c2678ab9031d7c60faf38b9631eb1ce (diff)
test: facilitate debugging Git executables in tests with gdb
When prefixing a Git call in the test suite with 'debug ', it will now be run with GDB, allowing the developer to debug test failures more conveniently. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wrap-for-bin.sh')
-rw-r--r--wrap-for-bin.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/wrap-for-bin.sh b/wrap-for-bin.sh
index 701d2339b9..db0ec6a737 100644
--- a/wrap-for-bin.sh
+++ b/wrap-for-bin.sh
@@ -19,4 +19,10 @@ GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR
-exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+if test -n "$GIT_TEST_GDB"
+then
+ unset GIT_TEST_GDB
+ exec gdb --args "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+else
+ exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+fi