Merge branch 'rs/daemon-plug-child-leak'
[gitweb.git] / t / test-lib-functions.sh
index 6dffb8bcde83b82fa40b05dd8ee815f4e6a3cdd3..73e37a1f6c23d00371dbd3f10aee1648e8b947bc 100644 (file)
@@ -145,6 +145,14 @@ test_pause () {
        fi
 }
 
+# Wrap git in gdb. Adding this to a command can make it easier to
+# understand what is going on in a failing test.
+#
+# Example: "debug git checkout master".
+debug () {
+        GIT_TEST_GDB=1 "$@"
+}
+
 # Call test_commit with the arguments "<message> [<file> [<contents> [<tag>]]]"
 #
 # This will commit a file with the given contents and the given commit