Re: [BUG] "git pull" will regress between 'master' and 'pu'

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

 



Jeff King <peff@xxxxxxxx> writes:

> On Mon, Apr 20, 2015 at 11:59:04AM -0700, Junio C Hamano wrote:
>
>> Jeff King <peff@xxxxxxxx> writes:
>> 
>> > @@ -334,7 +333,7 @@ true)
>> >  	eval="git-merge $diffstat $no_commit $verify_signatures $edit $squash $no_ff $ff_only"
>> >  	eval="$eval $log_arg $strategy_args $merge_args $verbosity $progress"
>> >  	eval="$eval $gpg_sign_args"
>> > -	eval="$eval -m \"\$merge_name\" $merge_head"
>> > +	eval="$eval FETCH_HEAD"
>> >  	;;
>> >  esac
>> >  eval "exec $eval"
>> >
>> > as we seem to special-case the name FETCH_HEAD. It assumes that
>> > git-merge's parsing of FETCH_HEAD is the same as what we do in git-pull,
>> > but that seems safe.
>> 
>> Unfortunately, "git merge"'s parsing of FETCH_HEAD forgets that we
>> may be creating an Octopus.  Otherwise the above should work well.
>
> That sounds like a bug we should fix regardless.

But I am not sure how it should behave. "git fetch $there A B C"
followed by "git merge FETCH_HEAD" merges only A, and I do not know
if people have come to depend on this behaviour.

I suspect there may be larger fallout from such a change, namely,
what should "git log FETCH_HEAD" do?  Should it traverse the history
starting from all things that are not marked as not-for-merge, or
should it just say "git rev-parse FETCH_HEAD" and use only the first
one as the starting point?

I would argue that it would be more consistent with how we envision
the "git merge FETCH_HEAD" should work if "git log FETCH_HEAD"
traversed from all fetched HEAD for merging, but surely it is a huge
potential incompatibility.

For that matter, "git rev-parse FETCH_HEAD" and even get_sha1() should
yield all fetched HEAD for merging if we want to be consistent.  I
haven't thought this through yet but it does not look pretty.
--
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]