[ET Trac] #2070: shallow checkouts do not work with branches

Steven R. Brandt trac-noreply at einsteintoolkit.org
Wed Feb 2 12:50:16 CST 2022


#2070: shallow checkouts do not work with branches

 Reporter: Roland Haas
   Status: resolved
Milestone: 
  Version: development version
     Type: bug
 Priority: minor
Component: GetComponents

Changes (by Steven R. Brandt):

status: resolved (was open)

Currently using both --shallow and a branch (rather than master) fails since GetComponents wants to first clone the full repo then switch to the requested branch which fails with a shallow clone.

However newer versions of git (>=1.7) support a "-b" (branch) option for clone and that one works fine even with shallow clones.

My recollection is that we could not use this method initially since there were clusters around that only offered git 1.6 (queenbee likely). This is no longer the case and all clusters in simfactory offer at least git 1.7.

This pull request:

https://github.com/gridaphobe/CRL/pull/6/files

both fixes the problem and simplifies the code.

**Keyword:**
Comment (by Steven R. Brandt):

Now git clone combines the use of --depth 1, --branch, and --single-branch

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2070/shallow-checkouts-do-not-work-with
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20220202/bf63c275/attachment.html 


More information about the Trac mailing list