Re: [PATCH v4] merge: new autosetupmerge option 'simple' for matching branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tao Klerks <tao@xxxxxxxxxx> writes:

> If they branched from a different-name remote branch (they created an
> new / independent local branch), then no remote tracking relationship
> will have been set up, and instead of the "fatal: The upstream branch
> of your current branch does not match
> the name of your current branch" error and advice, they will get a
> much simpler error and advice:
>
> ---
> fatal: The current branch whatevs has no upstream branch.
> To push the current branch and set the remote as upstream, use
>
>     git push --set-upstream origin whatevs
> ---
>
> When they follow those instructions, they will be in the "simple"
> setup same as if they had just branched from same-name.

Which means that they need to see an error once, offered to either
set push.default or branch.autosetupmerge (it is not "and/or", but
"or", because you want to tell them to set "instead of push.default,
set branch.autosetupmerge"), and if they follow the latter, they have
to then hit a different error and be told to do the "set-upstream"
individually.  I am wondering if that is more irritating than it is
worth.  Instead, if you tell them to use branch.autosetupmerge=simple
and use push.default to something better than simple, wouldn't that
cover more cases and give fewer roadblocks to the end-user with
unnecessary errors?

>> Setting the latter to 'simple'
>> means there are *MORE* branches that do not have .remote/.merge set
>> up, doesn't it?  Which in turn means that we are relying more on
>> what push.default is set to, right?
>
> No

Why no?  if setupauto is yes, then any new branch forked from a
remote-tracking branch will get .remote/.merge set up, and with these
specific configuration they can "push" back to the configured place.
If it is set to simple, only new branches forked from a remote-tracking
branch that happens to have the same name will get it, and others do
not get .remote/.merge set up.  Which means user's "git push" will then
consult push.default settings, and setting it right becomes more 
important, no?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux