Skip to content

Commit

Permalink
Merge branch 'jh/partial-clone'
Browse files Browse the repository at this point in the history
The recent addition of "partial clone" experimental feature kicked
in when it shouldn't, namely, when there is no partial-clone filter
defined even if extensions.partialclone is set.

* jh/partial-clone:
  list-objects: check if filter is NULL before using
  • Loading branch information
gitster committed Jun 28, 2018
2 parents 078f3dc + cac1137 commit 92e1bbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions list-objects-filter-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ void partial_clone_get_default_filter_spec(
/*
* Parse default value, but silently ignore it if it is invalid.
*/
if (!core_partial_clone_filter_default)
return;
gently_parse_list_objects_filter(filter_options,
core_partial_clone_filter_default,
NULL);
Expand Down
8 changes: 8 additions & 0 deletions t/t0410-partial-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ promise_and_delete () {
delete_object repo "$HASH"
}

test_expect_success 'extensions.partialclone without filter' '
test_create_repo server &&
git clone --filter="blob:none" "file://$(pwd)/server" client &&
git -C client config --unset core.partialclonefilter &&
git -C client fetch origin
'

test_expect_success 'missing reflog object, but promised by a commit, passes fsck' '
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
Expand Down

0 comments on commit 92e1bbc

Please sign in to comment.