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
Junio C Hamano <gitster@pobox.com>
Date
Sep 5, 2013, 18:19 UTC
Message-ID
<xmqqtxhzi12h.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20130904150853.52EC4121B7E@jed-dev-01.labnet>
Joergen Edelbo <jed@napatech.com> writes:
Show 19 quoted lines
> +proc get_remote_branch {} {
> +	global push_branchtype push_branch push_new
> +	set branch {}
> +	switch -- $push_branchtype {
> +	existing { set branch $push_branch }
> +	create   { set branch $push_new }
> +	}
> +   return $branch
> +}
> +
> +proc get_remote_ref_spec {} {
> +	global gerrit_review
> +	set push_branch [get_remote_branch]
> +	if {$gerrit_review} {
> +		return "refs/for/$push_branch"
> +	} else {
> +		return "refs/heads/$push_branch"
>  	}
> +}

I am puzzled. This may be fine for those who use Git-GUI and nothing else to push, but will not help whose who use both Git-GUI and the command line.

Isn't the right way to improve the situation to let the command line tools know how the user wants to push things out and just have Git-GUI delegate the choice to the underlying "git push"?

For example, if you are working on a topic 'frotz', and if the location you push is managed by Gerrit, isn't it the case that you always want to push it to "refs/for/frotz", whether you are pushing via Git-GUI or from the command line?

I think we discussed during 1.8.4 cycle a configuration like this:
	[branch "frotz"]
        	push = refs/heads/frotz:refs/for/frotz

as part of the "triangular workflow" topic that allows you to specify that "when 'frotz' is pushed out, it goes to refs/for/frotz", or something like that, but I do not recall what came out of that.

Previous: Heiko Voigt
Message 11 of 11 in “git-gui: Modify push dialog to support Gerrit review”
  1. git-gui: Modify push dialog to support Gerrit reviewJoergen Edelbo, Sep 2, 2013
  2. Heiko VoigtSep 5, 2013
  3. Johannes SixtSep 5, 2013
  4. Jørgen EdelboSep 5, 2013
  5. Johannes SixtSep 5, 2013
  6. Jørgen EdelboSep 5, 2013
  7. Johannes SixtSep 5, 2013
  8. Junio C HamanoSep 5, 2013
  9. Jørgen EdelboSep 6, 2013
  10. Heiko VoigtSep 5, 2013
  11. Junio C HamanoSep 5, 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.