Page MenuHomePhabricator

git-review should be set up so it uses a single remote
Closed, DeclinedPublic

Description

When I use git-review with one of the repositories installed by vagrant, I end up with two remotes, 'origin' and 'gerrit'. When I follow the instructions on the MediaWiki page and set things up manually, there is only 'origin', and git-review behaves a lot better. The difference is probably caused by

[gerrit]
defaultremote = origin

in ~/.config/git-review/git-review.conf - this should be added by default.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=46870

Details

Reference
bz57680

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:26 AM
bzimport set Reference to bz57680.
bzimport added a subscriber: Unknown Object (MLST).

I don't think that MediaWiki-Vagrant should be attempting to modify anything in $HOME on the host machine. Are you wanting a git-review.conf created for the vagrant user account in the guest VM? This may all be made moot if Yuri finds a solution for bug 46870.

For the guest VM, yes. I'm not sure bug 46870 affects this; for one thing, not every extension has a vagrant role. Also, I would expect vagrant to respect my defaultremote setting when cloning extensions (which it would if you simply run git-review -s instead of creating remotes by hand, which seems a whole lot safer anyway.)

Alternatively, you might try to look for a defaultremote setting on the host machine and copy that if it exists.

(In reply to Tisza Gergő from comment #0)

this should be added by default.

Yeah, I agree. It makes git-review saner.

Change 146014 had a related patch set uploaded by Ori.livneh:
git-review: configure 'origin' as the default remote

https://gerrit.wikimedia.org/r/146014

Bulk unassigning bugs from Ori.

bd808 triaged this task as Low priority.Dec 30 2014, 2:31 AM

As noted on the commit, I think this cannot be made to work without either making things insecure (e.g. storing the gerrit password on the VM) or requiring complex SSH agent setup on the host machine that is nontrivial to most users.

The main motivation was to avoid the fake warnings git-review gives about trying to submit multiple patches when actually it just gets confused by the gerrit remote having an outdated HEAD compared to the origin remote. That could be fixed inside git-review instead; I filed a bug (#2000282) but git-review is so abandoned even their bugtracker is broken, so I don't expect that will do any good. (I guess not worth wasting time on now that we are about to switch to Phabricator/arcanist.)

Tgr claimed this task.