All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Joergen Edelbo <jed@napatech.com>
Cc: git@vger.kernel.org, spearce@spearce.org, hvoigt@hvoigt.net
Subject: Re: [PATCH] git-gui: Modify push dialog to support Gerrit review
Date: Thu, 05 Sep 2013 11:19:02 -0700	[thread overview]
Message-ID: <xmqqtxhzi12h.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20130904150853.52EC4121B7E@jed-dev-01.labnet> (Joergen Edelbo's message of "Mon, 2 Sep 2013 10:54:19 +0200")

Joergen Edelbo <jed@napatech.com> writes:

> +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.

  parent reply	other threads:[~2013-09-05 18:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-02  8:54 [PATCH] git-gui: Modify push dialog to support Gerrit review Joergen Edelbo
2013-09-05  6:20 ` Heiko Voigt
2013-09-05  6:42 ` Johannes Sixt
2013-09-05  8:29   ` Jørgen Edelbo
2013-09-05  8:57     ` Johannes Sixt
2013-09-05  9:18       ` Jørgen Edelbo
2013-09-05  9:31         ` Johannes Sixt
2013-09-05 17:34         ` Junio C Hamano
2013-09-06  8:17           ` Jørgen Edelbo
2013-09-05 21:04         ` Heiko Voigt
2013-09-05 18:19 ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-06 10:30 Joergen Edelbo
2013-09-06 21:49 ` Phil Hord
2013-09-07 17:03   ` Jørgen Edelbo
2013-09-12  9:21 Joergen Edelbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtxhzi12h.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=jed@napatech.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.