@matheusbsbs / matheus-bagliano / commits / 6c28bef2d4
Fork 0

t5616: use rev-parse instead to get HEAD's object_id

Only HEAD's object_id is necessary, rev-list is an overkill. Despite POSIX requires grep(1) treat single pattern with <newline> as multiple patterns. busybox's grep(1) (as of v1.31.1) haven't implemented it yet. Use rev-parse to simplify the test and avoid busybox unimplemented features. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Đoàn Trần Công Danh committed Mar 25, 2020 at 22:06 UTC 6c28bef2d4bb71ec90be0fa6049d4925f6713903
1 file changed +1 -1
t/t5616-partial-clone.sh
+1 -1
@@ -49,7 +49,7 @@ test_expect_success 'do partial clone 1' '
49 test_expect_success 'verify that .promisor file contains refs fetched' '
50 ls pc1/.git/objects/pack/pack-*.promisor >promisorlist &&
51 test_line_count = 1 promisorlist &&
52 - git -C srv.bare rev-list HEAD >headhash &&
52 + git -C srv.bare rev-parse --verify HEAD >headhash &&
53 grep "$(cat headhash) HEAD" $(cat promisorlist) &&
54 grep "$(cat headhash) refs/heads/master" $(cat promisorlist)
55 '