#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@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@github.com:rhaas/Foo.git into: ./arrangements Executing: mkdir -p './repos' Executing: git clone git@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-assu...