aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-06-04 08:45:49 +0100
committerGitHub <noreply@github.com>2023-06-04 08:45:49 +0100
commit87d35b7f0e80cb30921480e7cf7498232bddee21 (patch)
tree8091b7a976dccb34f84c5a26dd2a7660d213a03c /repository.go
parentd37c8b92eb84a2b66413262c33812236b91422f9 (diff)
parent5889b758b390cba1b01db6684eb83760fd7fb58c (diff)
downloadgo-git-87d35b7f0e80cb30921480e7cf7498232bddee21.tar.gz
Merge pull request #758 from AriehSchneier/head-not-master
git: Clone HEAD should not force master. Fixes #363
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/repository.go b/repository.go
index 17fa5dd..6c3be2e 100644
--- a/repository.go
+++ b/repository.go
@@ -967,7 +967,6 @@ func (r *Repository) cloneRefSpec(o *CloneOptions) []config.RefSpec {
case o.SingleBranch && o.ReferenceName == plumbing.HEAD:
return []config.RefSpec{
config.RefSpec(fmt.Sprintf(refspecSingleBranchHEAD, o.RemoteName)),
- config.RefSpec(fmt.Sprintf(refspecSingleBranch, plumbing.Master.Short(), o.RemoteName)),
}
case o.SingleBranch:
return []config.RefSpec{