Local branch named "review" causes "error: unable to resolve reference" error in "git-review -d"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-review |
New
|
Undecided
|
Unassigned |
Bug Description
I've had a local branch called "review", unrelated to git-review experience:
$ git branch -vv
* master bea4447 [origin/master] Localisation updates from http://
review c019799 Squashed commit of all RSS changes ported from SVN.
$ git-review -d 3925
Downloading refs/changes/
Cannot checkout to new branch
The following command failed with exit code 128
"git checkout -b review/
-------
error: unable to resolve reference refs/heads/
fatal: Failed to lock ref for update: Not a directory
-------
this is because
$ cat .git/refs/
c019799eea571ad
already exists for a local branch.
Conversely, if something is checked out with "git-review -d", it is impossible to have a local branch named "review":
$ git branch -vv
* master bea4447 [origin/master] Localisation updates from http://
review-old c019799 Squashed commit of all RSS changes ported from SVN.
$ git-review -d 3925
Downloading refs/changes/
Switched to branch 'review/
$ git checkout -b review
error: there are still refs under 'refs/heads/review'
fatal: Failed to lock ref for update: Is a directory
This obviously a limitation of git (especially the latter case) but I believe "git review -d" should be able to do something in this case (workaround or a better diagnostics to the end user)