Merge branch 'jk/allow-fetch-onelevel-refname' into maint
"git clone" would fail to clone from a repository that has a ref directly under "refs/", e.g. "refs/stash", because different validation paths do different things on such a refname. Loosen the client side's validation to allow such a ref. * jk/allow-fetch-onelevel-refname: fetch-pack: do not filter out one-level refs
This commit is contained in:
@ -594,4 +594,15 @@ test_expect_success 'all boundary commits are excluded' '
|
||||
test_bundle_object_count .git/objects/pack/pack-${pack##pack }.pack 3
|
||||
'
|
||||
|
||||
test_expect_success 'fetching a one-level ref works' '
|
||||
test_commit extra &&
|
||||
git reset --hard HEAD^ &&
|
||||
git update-ref refs/foo extra &&
|
||||
git init one-level &&
|
||||
(
|
||||
cd one-level &&
|
||||
git fetch .. HEAD refs/foo
|
||||
)
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user