Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When Cachito worker downloads GIT dependency, the downloaded Git repository is checked out at a proper revision (according to the `Gemfile.lock`), but it's not checked out at a proper branch. Until now, Cachito was using `git checkout -b <branch name>`, however, this didn't work for cases when the branch already existed (e.g. downloaded repositories usually contained `master` branch and if the `Gemfile.lock` specified `master` branch too, this command tried to create a branch that already existed). To fix this, `-B` option should be used in `git checkout`, because in case of an existing branch, it checks out the branch and resets it to the current commit and no error is raised. Signed-off-by: Milan Tichavský <[email protected]>
- Loading branch information