diff options
author | Ralf Thielow <ralf.thielow@gmail.com> | 2012-09-20 20:04:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-20 14:15:35 -0700 |
commit | 31b808a03290a4f87c571cc1c61f26d8a03c7025 (patch) | |
tree | 7c55f5032cf25b17a413d624c3de2ba61b9ea00b /replace_object.c | |
parent | 1403db49b80630cf8c36ba3e8b0f085ea0ab8286 (diff) | |
download | git-31b808a03290a4f87c571cc1c61f26d8a03c7025.tar.gz git-31b808a03290a4f87c571cc1c61f26d8a03c7025.tar.xz |
clone --single: limit the fetch refspec to fetched branch
After running "git clone --single", the resulting repository has the
usual default "+refs/heads/*:refs/remotes/origin/*" wildcard fetch
refspec installed, which means that a subsequent "git fetch" will
end up grabbing all the other branches.
Update the fetch refspec to cover only the singly cloned ref instead
to correct this.
That means:
If "--single" is used without "--branch" or "--mirror", the
fetch refspec covers the branch on which remote's HEAD points to.
If "--single" is used with "--branch", it'll cover only the branch
specified in the "--branch" option.
If "--single" is combined with "--mirror", then it'll cover all
refs of the cloned repository.
If "--single" is used with "--branch" that specifies a tag, then
it'll cover only the ref for this tag.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'replace_object.c')
0 files changed, 0 insertions, 0 deletions