git-review no longer honor url.insteadof
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-review |
Fix Committed
|
High
|
JC Delay | ||
git-review (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
git-review no longer uses the URL replacement patterns defined in .gitconfig.
For example, let's assume the following config in ~/.gitconfig:
[url "ssh://
insteadof = review:
Cloning a repository hosted on that remote works as expected (git clone actually expands "review:" in "ssh://
$ git clone review:project
Cloning into 'project'...
[..snip..] done.
However, using git-review will fail because it no longer expands "review:".
This change was introduced by commit cc28fb696 fixing bug #1177429:
Previous "git-remote show" command was replaced by a call to git_config_
Unfortunately, while "git-remote show" correctly expands the remote url:
$ git remote show -n origin
* remote origin
Fetch URL: ssh://review.
Push URL: ssh://review.
[..snip..]
"git-config" doesn't:
$ git config --get remote.origin.url
review:project
This is only affecting the latest release of git-review, version 1.24, AFAICT.
An easy workaround it to rely on SSH config instead of Git config: remove the "insteadof" section in ~/.gitconfig and update ~/.ssh/config with something along the lines of:
Host review
Hostname review.example.org
Port 29418
BTW, this is the recommended configuration as per Gerrit Code Review documentation:
https:/
And it allows the exact same syntax as the equivalent in Git configuration.
However, this potentially breaks users setup and is less consistent than the previous behavior IMHO.
Thank you,
JcD
description: | updated |
Changed in git-review: | |
assignee: | nobody → JC Delay (jcd-delay) |
Changed in git-review: | |
status: | Triaged → In Progress |
(Amusingly?) I wasn't even aware we had this feature in git-review. Given that we've introduced a regression, when this is fixed it should be accompanied by a regression test ensuring it doesn't happen again.
Thanks for the heads up!