aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-12-15 23:06:13 -0800
committerJunio C Hamano <gitster@pobox.com>2008-12-15 23:06:13 -0800
commit90c3302173c5a02189f5fe9091c0d07f7b7ebe89 (patch)
tree3488c30e5932a751c344083bfd289c0c48de2ba9 /t
parent8befc50c49e8a271fd3cd7fb34258fe88d1dfcad (diff)
parent87c8a56e4f71cc7e22c16caa4adc2ae17f6aa93d (diff)
downloadgit-90c3302173c5a02189f5fe9091c0d07f7b7ebe89.tar.gz
git-90c3302173c5a02189f5fe9091c0d07f7b7ebe89.tar.xz
Merge branch 'maint'
* maint: fast-import: close pack before unlinking it pager: do not dup2 stderr if it is already redirected git-show: do not segfault when showing a bad tag
Diffstat (limited to 't')
-rwxr-xr-xt/t7007-show.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t7007-show.sh b/t/t7007-show.sh
new file mode 100755
index 000000000..cce222f05
--- /dev/null
+++ b/t/t7007-show.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+test_description='git show'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ echo hello world >foo &&
+ H=$(git hash-object -w foo) &&
+ git tag -a foo-tag -m "Tags $H" $H &&
+ HH=$(expr "$H" : "\(..\)") &&
+ H38=$(expr "$H" : "..\(.*\)") &&
+ rm -f .git/objects/$HH/$H38
+'
+
+test_expect_success 'showing a tag that point at a missing object' '
+ test_must_fail git --no-pager show foo-tag
+'
+
+test_done