Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <bk2204@github.com>2020-03-16 21:05:05 +0300
committerJunio C Hamano <gitster@pobox.com>2020-03-16 21:37:02 +0300
commitdfc8cdc6772a05db4ed64c45df3fe2defdae7eb3 (patch)
tree9e6c2fc6a8add4ce73c8d1fc27ab05984464bd27 /t/t0021-conversion.sh
parent13e7ed6a3a0ecd5d50b7bba2d86ce9d88494fa9b (diff)
builtin/clone: compute checkout metadata for clones
When checking out a commit, provide metadata to the filter process including the ref we're using. Signed-off-by: brian m. carlson <bk2204@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0021-conversion.sh')
-rwxr-xr-xt/t0021-conversion.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index 4b8d6a74a7..ad329044a3 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -748,7 +748,8 @@ test_expect_success PERL 'delayed checkout in process filter' '
) &&
S=$(file_size "$TEST_ROOT/test.o") &&
- M="blob=$(git -C repo rev-parse --verify master:test.a)" &&
+ PM="ref=refs/heads/master treeish=$(git -C repo rev-parse --verify master) " &&
+ M="${PM}blob=$(git -C repo rev-parse --verify master:test.a)" &&
cat >a.exp <<-EOF &&
START
init handshake complete
@@ -789,8 +790,11 @@ test_expect_success PERL 'delayed checkout in process filter' '
rm *.a *.b &&
filter_git checkout . &&
- test_cmp_count ../a.exp a.log &&
- test_cmp_count ../b.exp b.log &&
+ # We are not checking out a ref here, so filter out ref metadata.
+ sed -e "s!$PM!!" ../a.exp >a.exp.filtered &&
+ sed -e "s!$PM!!" ../b.exp >b.exp.filtered &&
+ test_cmp_count a.exp.filtered a.log &&
+ test_cmp_count b.exp.filtered b.log &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay10.a &&