Skip to content

Commit be7bae0

Browse files
spearcegitster
authored andcommitted
Don't allow git-describe failures to go unnoticed in t6120
If git-describe fails we never execute the test_expect_success, so we never actually test for failure. This is horribly wrong. We need to always run the test case, but the test case is only supposed to succeed if the prior git-describe returned 0. Signed-off-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3167d72 commit be7bae0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/t6120-describe.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ test_description='test describe
1515
check_describe () {
1616
expect="$1"
1717
shift
18-
R=$(git describe "$@") &&
18+
R=$(git describe "$@")
19+
S=$?
1920
test_expect_success "describe $*" '
21+
test $S = 0 &&
2022
case "$R" in
2123
$expect) echo happy ;;
2224
*) echo "Oops - $R is not $expect";

0 commit comments

Comments
 (0)