path: root/builtin/receive-pack.c
diff options
authorRalf Thielow <>2012-09-20 18:04:08 (GMT)
committerJunio C Hamano <>2012-09-20 21:15:35 (GMT)
commit31b808a03290a4f87c571cc1c61f26d8a03c7025 (patch)
tree7c55f5032cf25b17a413d624c3de2ba61b9ea00b /builtin/receive-pack.c
parent1403db49b80630cf8c36ba3e8b0f085ea0ab8286 (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/receive-pack.c')
0 files changed, 0 insertions, 0 deletions