t6300: check for cat-file exit status code
In test_atom(), we're piping the output of cat-file to tail(1), thus, losing its exit status. Let's use a temporary file to preserve git exit status code. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
597fa8cb43
commit
1549577338
|
@ -66,7 +66,9 @@ test_atom() {
|
||||||
case $type in
|
case $type in
|
||||||
tag)
|
tag)
|
||||||
# We cannot use $3 as it expects sanitize_pgp to run
|
# We cannot use $3 as it expects sanitize_pgp to run
|
||||||
expect=$(git cat-file tag $ref | tail -n +6 | wc -c) ;;
|
git cat-file tag $ref >out &&
|
||||||
|
expect=$(tail -n +6 out | wc -c) &&
|
||||||
|
rm -f out ;;
|
||||||
tree | blob)
|
tree | blob)
|
||||||
expect="" ;;
|
expect="" ;;
|
||||||
commit)
|
commit)
|
||||||
|
|
Loading…
Reference in New Issue