summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:21 (GMT)
commitcfd9167c15e7b09f3964204964a4c158108c6403 (patch)
tree678a4051a44c8931ea469123528679e9987d0689 /t
parenta3d41733f9dd0d638d1538b54d516fed033c165b (diff)
parentdf799f5d99ac51d4fc791d546de3f936088582fc (diff)
downloadgit-cfd9167c15e7b09f3964204964a4c158108c6403.zip
git-cfd9167c15e7b09f3964204964a4c158108c6403.tar.gz
git-cfd9167c15e7b09f3964204964a4c158108c6403.tar.bz2
Merge branch 'dt/cat-file-batch-ambiguous'
"git cat-file --batch" reported a dangling symbolic link by mistake, when it wanted to report that a given name is ambiguous. * dt/cat-file-batch-ambiguous: t1512: test ambiguous cat-file --batch and --batch-output Do not print 'dangling' for cat-file in case of ambiguity
Diffstat (limited to 't')
-rwxr-xr-xt/t1512-rev-parse-disambiguation.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh
index e4d5b56..c19fb50 100755
--- a/t/t1512-rev-parse-disambiguation.sh
+++ b/t/t1512-rev-parse-disambiguation.sh
@@ -388,4 +388,14 @@ test_expect_success C_LOCALE_OUTPUT 'ambiguous commits are printed by type first
done
'
+test_expect_success 'cat-file --batch and --batch-check show ambiguous' '
+ echo "0000 ambiguous" >expect &&
+ echo 0000 | git cat-file --batch-check >actual 2>err &&
+ test_cmp expect actual &&
+ test_i18ngrep hint: err &&
+ echo 0000 | git cat-file --batch >actual 2>err &&
+ test_cmp expect actual &&
+ test_i18ngrep hint: err
+'
+
test_done