git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
eaa3688a3130d62bbb6d13f4da5d202f403cab83 blob 919 bytes (raw)

 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
 
#!/bin/sh

test_description='basic tests for external object databases'

. ./test-lib.sh

ALT_SOURCE="$PWD/alt-repo/.git"
export ALT_SOURCE
write_script odb-helper <<\EOF
GIT_DIR=$ALT_SOURCE; export GIT_DIR
case "$1" in
have)
	git cat-file --batch-check --batch-all-objects |
	awk '{print $1 " " $3 " " $2}'
	;;
get_git_obj)
	cat "$GIT_DIR"/objects/$(echo $2 | sed 's#..#&/#')
	;;
esac
EOF
HELPER="\"$PWD\"/odb-helper"

test_expect_success 'setup alternate repo' '
	git init alt-repo &&
	test_commit -C alt-repo one &&
	test_commit -C alt-repo two &&
	alt_head=$(git -C alt-repo rev-parse HEAD)
'

test_expect_success 'alt objects are missing' '
	test_must_fail git log --format=%s $alt_head
'

test_expect_success 'helper can retrieve alt objects' '
	test_config odb.magic.scriptCommand "$HELPER" &&
	cat >expect <<-\EOF &&
	two
	one
	EOF
	git log --format=%s $alt_head >actual &&
	test_cmp expect actual
'

test_done
debug log:

solving eaa3688a31 ...
found eaa3688a31 in https://public-inbox.org/git/20180319133147.15413-10-chriscool@tuxfamily.org/

applying [1/1] https://public-inbox.org/git/20180319133147.15413-10-chriscool@tuxfamily.org/
diff --git a/t/t0500-external-odb.sh b/t/t0500-external-odb.sh
new file mode 100755
index 0000000000..eaa3688a31

Checking patch t/t0500-external-odb.sh...
Applied patch t/t0500-external-odb.sh cleanly.

index at:
100755 eaa3688a3130d62bbb6d13f4da5d202f403cab83	t/t0500-external-odb.sh

Code repositories for project(s) associated with this 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).