Skip to content

Commit

Permalink
test-lib: do not remove trash_directory if called with --debug
Browse files Browse the repository at this point in the history
Sometimes you want to keep the trash directory, even if all tests
passed.  For example, when extending tests, it comes it quite handy.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Aug 22, 2008
1 parent 4be636f commit 5a4a088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ fi

# Test repository
test="trash directory.$(basename "$0" .sh)"
remove_trash="$TEST_DIRECTORY/$test"
test ! -z "$debug" || remove_trash="$TEST_DIRECTORY/$test"
rm -fr "$test" || {
trap - exit
echo >&5 "FATAL: Cannot prepare test area"
Expand Down

0 comments on commit 5a4a088

Please sign in to comment.