git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob 3553f84a00c1533ac204e5806fd63ba7be855219 1567 bytes (raw)
name: t/t6301-for-each-ref-errors.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
#!/bin/sh

test_description='for-each-ref errors for broken refs'

. ./test-lib.sh

ZEROS=$ZERO_OID

test_expect_success setup '
	MISSING=$(test_oid deadbeef) &&
	git commit --allow-empty -m "Initial" &&
	git tag testtag &&
	git for-each-ref >full-list &&
	git for-each-ref --format="%(objectname) %(refname)" >brief-list
'

test_expect_success 'Broken refs are reported correctly' '
	r=refs/heads/bogus &&
	: >.git/$r &&
	test_when_finished "rm -f .git/$r" &&
	echo "warning: ignoring broken ref $r" >broken-err &&
	git for-each-ref >out 2>err &&
	test_cmp full-list out &&
	test_cmp broken-err err
'

test_expect_success 'NULL_SHA1 refs are reported correctly' '
	r=refs/heads/zeros &&
	echo $ZEROS >.git/$r &&
	test_when_finished "rm -f .git/$r" &&
	echo "warning: ignoring broken ref $r" >zeros-err &&
	git for-each-ref >out 2>err &&
	test_cmp full-list out &&
	test_cmp zeros-err err &&
	git for-each-ref --format="%(objectname) %(refname)" >brief-out 2>brief-err &&
	test_cmp brief-list brief-out &&
	test_cmp zeros-err brief-err
'

test_expect_success 'Missing objects are reported correctly' '
	r=refs/heads/missing &&
	echo $MISSING >.git/$r &&
	test_when_finished "rm -f .git/$r" &&
	echo "fatal: $MISSING missing" >missing-err &&
	test_must_fail git for-each-ref 2>err &&
	test_cmp missing-err err &&
	(
		cat brief-list &&
		echo "$MISSING $r"
	) | sort -k 2 >missing-brief-expected &&
	git for-each-ref --format="%(objectname) %(refname)" >brief-out 2>brief-err &&
	test_cmp missing-brief-expected brief-out &&
	test_must_be_empty brief-err
'

test_done

debug log:

solving 3553f84a00c ...
found 3553f84a00c in https://public-inbox.org/git/0149940ee4d7282360234f1ef1ec270def83c907.1625155693.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/937f88b78371d1a4497c8dc389a499ab51446075.1624636945.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/85686187d49500b9ac4afaf526f5031ff5842aff.1624797351.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/db7dd8b042c281afdccb650f9679e88a4e378b65.1624332055.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/790c558d7cc1f66049c1280e6dddbe194806a0dc.1626090419.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/7058f47d41d74ad874b9e74f469dc473fd0d3413.1626363626.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/d477edb6f05672a85fd3eb907ca13cc4a524113d.1628842990.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/44ebf75e2e937b76a7c2887cd98da2912240811c.1623496458.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/765337a46ab0f6c8ad38007a78c850f5dd4cfa38.1623763747.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/bd534a266a401a8edbf8c4d12a2d9e44fcc79d70.1624086181.git.gitgitgadget@gmail.com/
found 40edf9dab53 in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100755 40edf9dab53402db9b5fad6dd060768537f9ba9a	t/t6301-for-each-ref-errors.sh

applying [1/1] https://public-inbox.org/git/0149940ee4d7282360234f1ef1ec270def83c907.1625155693.git.gitgitgadget@gmail.com/
diff --git a/t/t6301-for-each-ref-errors.sh b/t/t6301-for-each-ref-errors.sh
index 40edf9dab53..3553f84a00c 100755

Checking patch t/t6301-for-each-ref-errors.sh...
Applied patch t/t6301-for-each-ref-errors.sh cleanly.

skipping https://public-inbox.org/git/937f88b78371d1a4497c8dc389a499ab51446075.1624636945.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/85686187d49500b9ac4afaf526f5031ff5842aff.1624797351.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/db7dd8b042c281afdccb650f9679e88a4e378b65.1624332055.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/790c558d7cc1f66049c1280e6dddbe194806a0dc.1626090419.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/7058f47d41d74ad874b9e74f469dc473fd0d3413.1626363626.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/d477edb6f05672a85fd3eb907ca13cc4a524113d.1628842990.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/44ebf75e2e937b76a7c2887cd98da2912240811c.1623496458.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/765337a46ab0f6c8ad38007a78c850f5dd4cfa38.1623763747.git.gitgitgadget@gmail.com/ for 3553f84a00c
skipping https://public-inbox.org/git/bd534a266a401a8edbf8c4d12a2d9e44fcc79d70.1624086181.git.gitgitgadget@gmail.com/ for 3553f84a00c
index at:
100755 3553f84a00c1533ac204e5806fd63ba7be855219	t/t6301-for-each-ref-errors.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).