Joergen Edelbo <> 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.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to