Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Let's debate about "Commit and Push" behaviour

On Sat, Aug 9, 2014 at 8:38 AM, Robin Stocker <robin@xxxxxxxxx> wrote:
> On Sat, Aug 9, 2014 at 1:16 AM, Alex Blewitt < alex.blewitt@xxxxxxxxx
> > wrote:
>
> On 9 Aug 2014, at 00:08, Matthias Sohn < matthias.sohn@xxxxxxxxx >
> wrote:
>
> > How about the following (using first matching rule) ?
> > - if local branch tracks a remote branch default to the tracked
> > remote branch
> > - if global push refspec is defined it defines the default
> > - otherwise default to last-used
>
> I think there’s danger of this becoming a little too magic. Why not
> have a drop-down (like the Run button does) of alternative options,
> so that you can choose appropriately?
>
> [Commit and Push] (v)
> to remote tracking branch
> to previous refspec
>
> ok, I agree, we should also show which branch that is
>
> [Commit and Push] (v)
> to tracked branch [featureX]
> to last used branch [master]

+1 for the dropdown idea. What's still open is what happens when I
click on the button. I think for this to be non-surprising,
we should include that in the label.

Also, there should be the option to open the "Push Branch..." wizard.
(I'm talking about the Staging View here. Dani's point about not
opening another dialog is for the Commit dialog, where something else
may be needed.)

Some examples. On a branch without upstream:

[Commit & Push Branch...]

On a branch with an upstream branch:

[Commit & Push to master] (v)
  Commit & Push Branch...

On a detached HEAD with a default push spec of HEAD:refs/for/master:

[Commit & Push to refs/for/master] (v)
  Commit & Push Commit...


All the above examples can also have an entry for "Commit & Push to xxx"
with xxx being the "last pushed-to branch". But I think we should do
that in a separate change, as it will also need some infrastructure
and thinking about what exactly should be stored and when.

I think we shouldn't make the labels be "to tracked branch" or
"to last used branch" with the branch at the end. Instead, focus on
*what* will happen, not the technicality of why the branch name is
there.

+1, I like this proposal

--
Matthias 


Back to the top