From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Git Mailing List <git@vger.kernel.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] merge: refuse to create too cool a merge by default
Date: Wed, 06 Apr 2016 12:18:33 -0700 [thread overview]
Message-ID: <xmqqshyywnp2.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CA+55aFy-mb00=KGWghx5XXfkv5dChnncoLoJA07f_2Y_or0FOw@mail.gmail.com> (Linus Torvalds's message of "Wed, 6 Apr 2016 11:55:52 -0700")
Linus Torvalds <torvalds@linux-foundation.org> 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.
next prev parent reply other threads:[~2016-04-06 19:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 20:21 [PATCH] merge: refuse to create too cool a merge by default Junio C Hamano
2016-03-18 20:25 ` Linus Torvalds
2016-03-18 20:33 ` Junio C Hamano
2016-04-06 18:36 ` Junio C Hamano
2016-04-06 18:55 ` Linus Torvalds
2016-04-06 19:18 ` Junio C Hamano [this message]
2016-03-18 21:00 ` Eric Sunshine
2016-03-18 21:57 ` Ramsay Jones
2016-03-18 22:23 ` David Turner
2016-03-18 22:45 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqshyywnp2.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.