Re: [PATCH] git-gui: Modify push dialog to support Gerrit review
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Sep 6, 2013, 21:49 UTC
- Message-ID
- <CABURp0qL6CSmt87OnTpRjS4VFikfA3O+w7-HgfB9d6Kip46EpA@mail.gmail.com>
- In-Reply-To
- <20130906105022.0718C12156D@jed-dev-01.labnet>
On Fri, Sep 6, 2013 at 6:30 AM, Joergen Edelbo <jed@napatech.com> wrote:
Show 9 quoted lines
> Problem: It is not possible to push for Gerrit review as you will > always try to push to "refs/heads/..." on the remote. > > Changes done: > > Add an option to select "Gerrit review" and a corresponding entry > for a branch name. If this option is selected, push the changes to > "refs/for/<gerrit-branch>/<local branch>". In this way the local branch > names will be used as topic branches on Gerrit.
In my gerrit repos, I have this configuration
$ git config remote.origin.push HEAD:refs/for/master
And so I can simply 'git push' and git does what I mean.
My main complaint with git-gui's push is that it ignores my configuration. Can you teach git-gui to honor this setting, instead?
I would like for this remote."name".push option to be smarter and figure out which $branch I mean when I am not on master, but that is a different discussion. Having said that, I see that your change to git-gui attempts to make that automatic. Kudos for that, but I don't think this will work for me as I am often on a detached branch and so "refs/heads/$b" is meaningless.
Can you think of a sane way to separate the "from" and the "to" branches in the GUI? I mean, I would like to push "HEAD" and I would like it to go to "refs/for/frotz-2.0".
Phil