diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-02-14 01:38:34 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-14 01:38:34 +0400 |
commit | c337684842e37d2422aa75b04ca1a3ee6d4a8ef0 (patch) | |
tree | 882018e8141e0abfe625832b3cebab0f406925b4 /t/t5510-fetch.sh | |
parent | 21261fabdde83514ddac0bbba96fdeb83a5c2363 (diff) | |
parent | 4c224081118ac27ea62cb249bd95e66cba652483 (diff) |
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
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-x | t/t5510-fetch.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 1f0f8e6827..07986d94bd 100755 --- a/t/t5510-fetch.sh +++ b/t/t5510-fetch.sh @@ -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 |