Re: [PATCH] merge: refuse to create too cool a merge by default

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

 



Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:

> ... And I guess it might not be too nasty
> to add: it could be done as part of the object checking pass after
> downloading the pack. Was that what you were thinking of?

Not that fancy, actually.  Running an equivalent of

    git rev-list --max-parents=0 ^HEAD FETCH_HEAD

was what I had in mind.  This shouldn't be too costly for a normal
case (O(N) where N is the number of changes on FETCH_HEAD since it
forked from you).

It needs to be done even when FETCH_HEAD is a descendant of HEAD,
(i.e. when we would have fast forwarded without creating a merge) to
be effective, as --no-allow-new-root is about not trusting your
subsystem people not doing silly things on purpose, unlike our
original patches.



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