mirror of
https://github.com/git/git.git
synced 2024-11-26 03:14:50 +08:00
21 lines
405 B
Bash
21 lines
405 B
Bash
|
#!/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
|