[ET Trac] #2580: GetComponents assumes that default branch name is "master"
Roland Haas
trac-noreply at einsteintoolkit.org
Thu Nov 25 14:52:39 CST 2021
#2580: GetComponents assumes that default branch name is "master"
Reporter: Roland Haas
Status: new
Milestone:
Version: development version
Type: bug
Priority: minor
Component: GetComponents
When using a stanza like this:
```
!TARGET = $ARR
!TYPE = git
!URL = git at github.com:rhaas/Foo.git
!REPO_BRANCH = main
!REPO_PATH= $2
!CHECKOUT =
Foo/Foo
```
GetComponents fails with:
```
> bin/GetComponents --verbose --root . thornlists/grhydrox.th
-----------------------------------------------------------------
Checking out module: Foo/Foo
from repository: git at github.com:rhaas/Foo.git
into: ./arrangements
Executing: mkdir -p './repos'
Executing: git clone git at github.com:rhaas/Foo.git './repos/Foo'
Cloning into './repos/Foo'...
Executing: git tag -l
In: './repos/Foo'
Executing: git checkout --track -b main origin/main
In: './repos/Foo'
fatal: A branch named 'main' already exists.
Executing: mv './repos/Foo' './repos/Foo.branch.failed.1'
Warning: Could not checkout Foo/Foo, unable to switch to branch main. Any existing symlinks to Foo/Foo will be broken
```
This can be made to work by leaving out the `REPO_BRANCH` option altogether, which is doable but not ideal.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2580/getcomponents-assumes-that-default-branch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20211125/fe6a0c22/attachment.html
More information about the Trac
mailing list