diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-12-05 16:58:47 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-05 09:46:05 -0800 |
commit | 096c9b8be95ae18f78f6b4750b1d93c3cf9c8f05 (patch) | |
tree | 6613ed906ca54ce85442171bf6a90dee6d638ae5 /t | |
parent | fsck: support referenced promisor objects (diff) | |
download | tgif-096c9b8be95ae18f78f6b4750b1d93c3cf9c8f05.tar.xz |
fsck: support promisor objects as CLI argument
Teach fsck to not treat missing promisor objects provided on the CLI as
an error when extensions.partialclone is set.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t0410-partial-clone.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh index 4f9931f9bb..e96f436b09 100755 --- a/t/t0410-partial-clone.sh +++ b/t/t0410-partial-clone.sh @@ -125,4 +125,17 @@ test_expect_success 'missing object, but promised, passes fsck' ' git -C repo fsck ' +test_expect_success 'missing CLI object, but promised, passes fsck' ' + rm -rf repo && + test_create_repo repo && + test_commit -C repo my_commit && + + A=$(git -C repo commit-tree -m a HEAD^{tree}) && + promise_and_delete "$A" && + + git -C repo config core.repositoryformatversion 1 && + git -C repo config extensions.partialclone "arbitrary string" && + git -C repo fsck "$A" +' + test_done |