Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository
  • go
  • ..
  • codehost
  • git.go
Find file BlameHistoryPermalink
  • Bryan C. Mills's avatar
    cmd/go/internal/modfetch/codehost: work around an apparent bug in 'git fetch --unshallow' · 1804bbab
    Bryan C. Mills authored Sep 16, 2019
    When 'git fetch' is passed the '--unshallow' flag, it assumes that the
    local and remote refs are equal.¹ However, we were fetching an
    expanded set of refs explicitly in the same command, violating that
    assumption.
    
    Now we first expand the set of refs, then unshallow the repo in a
    separate fetch. Empirically, this seems to work, whereas the opposite
    order does not.
    
    ¹https://github.com/git/git/blob/4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a/transport.c#L1303-L1309
    
    Fixes #34266
    
    Change-Id: Ie97eb7c1223f944003a1e31d0ec9e69aad0efc0d
    Reviewed-on: https://go-review.googlesource.com/c/go/+/196961
    
    
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
    1804bbab
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7