git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-gui: Modify push dialog to support Gerrit review

From
JEJørgen Edelbo <jed@napatech.com>
Date
Sep 7, 2013, 17:03 UTC
Message-ID
<522B5C79.3000107@napatech.com>
In-Reply-To
<CABURp0qL6CSmt87OnTpRjS4VFikfA3O+w7-HgfB9d6Kip46EpA@mail.gmail.com>
On 06-09-2013 23:49, Phil Hord wrote:
> 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".

My first attemt at this change was to do do exactly that: always push HEAD, and being able to specify the destination branches. If it was a Gerrit review server, it would replace refs/heads/... with refs/for/...

However, it is now clear, that we have to support specifying the branches to push.

My next thought was: could we add an entry to the list of branches to 
push, meaning "omit the branch specs in the command". Then it should 
just perform a "git push <remote>". What was then pushed would depend
on the push configuration for the remote. In the Gerrit case we could 
then have:
   push = HEAD:refs/for/master, or whatever.

The drawback of this solution is that the UI is not so intuitive and it would not support the case where you would want to push your branch frotz to refs/for/master/frotz, which is the way you specify a topic in Gerrit. The current solution supports this.

What remains to support is the case where you work on a detached HEAD. Most of it should be straight forward. The gui knows we are in detached state, so in this case, a "HEAD" entry could be added to the list of branches. The question is just: to which branch to push to in the non Gerrit case? Perhaps the ref specs could just be left out in this case.

Previous: Phil Hord
Message 3 of 3 in “git-gui: Modify push dialog to support Gerrit review”
  1. git-gui: Modify push dialog to support Gerrit reviewJoergen Edelbo, Sep 6, 2013
  2. Phil HordSep 6, 2013
  3. Jørgen EdelboSep 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.