public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Michael S. Tsirkin" <mst@redhat•com>
Cc: git@vger•kernel.org, sunshine@sunshineco•com, jrnieder@gmail•com,
	peff@peff•net
Subject: Re: [PATCH v3 2/3] patch-id: document new behaviour
Date: Wed, 02 Apr 2014 11:18:26 -0700	[thread overview]
Message-ID: <xmqqy4zntx1p.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140331204205.GB12403@redhat.com> (Michael S. Tsirkin's message of "Mon, 31 Mar 2014 23:42:05 +0300")

"Michael S. Tsirkin" <mst@redhat•com> writes:

> On Mon, Mar 31, 2014 at 12:54:46PM -0700, Junio C Hamano wrote:
>> "Michael S. Tsirkin" <mst@redhat•com> writes:
>> 
>> > The hash used is mostly an internal implementation detail, isn't it?
>> 
>> Yes, but that does not mean we can break people who keep an external
>> database indexed with the patch-id by changing the default under
>> them, and "they can give --unstable option to work it around" is a
>> workaround, not a fix.  Without this change, they did not have to do
>> anything.
>> 
>> I would imagine that most of these people will be using the plain
>> vanilla "git show" output without any ordering or hunk splitting
>> when coming up with such a key.  A possible way forward to allow the
>> configuration that corresponds to "-O<orderfile>" while not breaking
>> the existing users could be to make the "patch-id --stable" kick in
>> automatically (of course, do this only when the user did not give
>> the "--unstable" command line option to override) when we see the
>> orderfile configuration in the repository, or when we see that the
>> incoming patch looks like reordered (e.g. has multiple "diff --git"
>> header lines that refer to the same path,
>
> This would require us to track affected files in memory.
> Issue?

Don't we already do that in order to handle a patch that touches the
same path more than once anyway?  I think a possibly larger issue
might be that you would still want to do the hashing in a single
pass so you may need to always keep two accumulated hashes, before
you can decide if the patch is or is not a straight-forward one and
use one of the two, but that hopefully should not require a rocket
scientist.

  reply	other threads:[~2014-04-03 10:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30 18:09 [PATCH v3 1/3] patch-id: make it stable against hunk reordering Michael S. Tsirkin
2014-03-30 18:09 ` [PATCH v3 2/3] patch-id: document new behaviour Michael S. Tsirkin
2014-03-31 19:08   ` Junio C Hamano
2014-03-31 19:26     ` Michael S. Tsirkin
2014-03-31 19:54       ` Junio C Hamano
2014-03-31 20:42         ` Michael S. Tsirkin
2014-04-02 18:18           ` Junio C Hamano [this message]
2014-04-02 19:02             ` Michael S. Tsirkin
2014-04-03 15:42               ` Junio C Hamano
2014-03-30 18:09 ` [PATCH v3 3/3] patch-id-test: test --stable and --unstable flags Michael S. Tsirkin
2014-03-31 19:29   ` Junio C Hamano
2014-03-31 17:59 ` [PATCH v3 1/3] patch-id: make it stable against hunk reordering Junio C Hamano
2014-03-31 19:04   ` Michael S. Tsirkin
2014-03-31 19:35     ` Junio C Hamano
2014-03-31 22:05 ` 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=xmqqy4zntx1p.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jrnieder@gmail$(echo .)com \
    --cc=mst@redhat$(echo .)com \
    --cc=peff@peff$(echo .)net \
    --cc=sunshine@sunshineco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox