[1.8.0] (v2) default "git merge" without argument to "git merge @{u}"

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

 



Ok, here is an update.

I wonder how we should keep track of the "proposal" series, though.
Sending the full-text replacement like I am doing here feels eh not
gittish.

Perhaps I should start a new directory in todo branch (say, 1.8.0), accept
patches from people?  I'd grudgingly admit that using Wiki on k.org may be
less burdensome (I hate editing inside the browser myself), but I'd want
to keep the mailing list the center of discussion and am afraid that
forcing people to go to Wiki would fragment the discussion.

I dunno.

--

Proposal:

Currently "git merge" without saying what to merge fails loudly.  As many
downstream developers (that are by definition more numerous than people
who do not have "upstream") run merge from the configured upstream of the
current branch most of the time, it would make it more convenient for them
to change the default to merge from the upstream of the current branch.
Running "git merge" without argument, when there is no upstream defined
for the current branch, will be an error.

Risks:

Existing scripts may prepare what to merge in an array (e.g. in Bourne,
accumulating them in "$@" by repeatedly doing 'set "$@" "$newbranch"') and
call 'git merge "$@"', relying on the current behaviour that zero argument
will flag an error condition.  Such scripts will be broken by this change.

Driving "git merge" with xargs without --no-run-if-empty (not POSIX),
feeding the branches to merge in an Octopus, will be broken the same way.

Migration plan:

Add merge.defaultToUpstream configuration variable, which defaults to
false when unconfigured.  Change "git merge" so that when this variable is
set and the command is run without the commit to merge to use the
configured upstream of the current branch (or error out if there isn't one).
Merge this change in the next 1.7.x series.

Update the error message issued when when "git merge" is run without the
commit to merge and this configuration variable is not explicitly set
either way to notify the user of upcoming incompatibility.

In 1.8.0, flip the default for merge.defaultUpstream to true.

Helped-by: Jeff King <peff@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]