change in git branch has no effect for existing repo
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
codetree |
Confirmed
|
High
|
Unassigned |
Bug Description
Recently I updated a collect file to fetch from a specified branch instead of the default branch.
"mojo collect" still finished successfully but the repo remained on the original branch.
At a minimum, I would expect codetree to switch the repository to the new branch, but I also would expect it to complain about the change in source, much as it does when the source itself is changed, and to require overwrite=True (or rm -rf) to proceed.
$ cat $MOJO_SPEC/
mattermost git+https:/
$ mojo collect
[...]
2020-08-18 22:25:21 [INFO] Updating repository at mattermost from refs/remotes/
2020-08-18 22:25:21 [INFO] Repository mattermost at revision 2b68f795ca39293
[...]
$ git -C /srv/mojo/
* master
$ rm -rf /srv/mojo/
$ rm -rf /srv/mojo/
$ mojo collect
[...]
2020-08-18 22:35:14 [INFO] Cloning repository at mattermost from https:/
2020-08-18 22:35:15 [INFO] Repository mattermost at revision b261ac7a54e390b
[...]
$ git -C /srv/mojo/
* built
$ _
description: | updated |
Changed in codetree: | |
status: | New → Confirmed |
importance: | Undecided → High |