File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -618,6 +618,25 @@ test_expect_success 'do not fetch when checking existence of tree we construct o
618
618
git -C repo cherry-pick side1
619
619
'
620
620
621
+ test_expect_success ' exact rename does not need to fetch the blob lazily' '
622
+ rm -rf repo partial.git &&
623
+ test_create_repo repo &&
624
+ content="some dummy content" &&
625
+ test_commit -C repo create-a-file file.txt "$content" &&
626
+ git -C repo mv file.txt new-file.txt &&
627
+ git -C repo commit -m rename-the-file &&
628
+ FILE_HASH=$(git -C repo rev-parse HEAD:new-file.txt) &&
629
+ test_config -C repo uploadpack.allowfilter 1 &&
630
+ test_config -C repo uploadpack.allowanysha1inwant 1 &&
631
+
632
+ git clone --filter=blob:none --bare "file://$(pwd)/repo" partial.git &&
633
+ git -C partial.git rev-list --objects --missing=print HEAD >out &&
634
+ grep "[?]$FILE_HASH" out &&
635
+ git -C partial.git log --follow -- new-file.txt &&
636
+ git -C partial.git rev-list --objects --missing=print HEAD >out &&
637
+ grep "[?]$FILE_HASH" out
638
+ '
639
+
621
640
test_expect_success ' lazy-fetch when accessing object not in the_repository' '
622
641
rm -rf full partial.git &&
623
642
test_create_repo full &&
You can’t perform that action at this time.
0 commit comments