Skip to content

Commit df799f5

Browse files
Eric Wonggitster
authored andcommitted
t1512: test ambiguous cat-file --batch and --batch-output
Test the new "ambiguous" result from cat-file --batch and --batch-check. This is in t1512 instead of t1006 since we need a repo with ambiguous object_id names. Signed-off-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d1dd94b commit df799f5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t1512-rev-parse-disambiguation.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,4 +388,14 @@ test_expect_success C_LOCALE_OUTPUT 'ambiguous commits are printed by type first
388388
done
389389
'
390390

391+
test_expect_success 'cat-file --batch and --batch-check show ambiguous' '
392+
echo "0000 ambiguous" >expect &&
393+
echo 0000 | git cat-file --batch-check >actual 2>err &&
394+
test_cmp expect actual &&
395+
test_i18ngrep hint: err &&
396+
echo 0000 | git cat-file --batch >actual 2>err &&
397+
test_cmp expect actual &&
398+
test_i18ngrep hint: err
399+
'
400+
391401
test_done

0 commit comments

Comments
 (0)