All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Ulrich Spörlein" <uqs@spoerlein.net>
Cc: Andreas Schwab <schwab@linux-m68k.org>, git@vger.kernel.org
Subject: Re: git merge commits are non-deterministic? what changed?
Date: Fri, 09 Nov 2012 16:52:48 +0100	[thread overview]
Message-ID: <vpq390idb8v.fsf@grenoble-inp.fr> (raw)
In-Reply-To: <20121109154245.GP69724@acme.spoerlein.net> ("Ulrich \=\?iso-8859-1\?Q\?Sp\=F6rlein\=22's\?\= message of "Fri, 9 Nov 2012 16:42:45 +0100")

Ulrich Spörlein <uqs@spoerlein.net> writes:

>> > 2. Why the hell is the commit hash dependent on the ordering of the
>> > parent commits? IMHO it should sort the set of parents before
>> > calculating the hash ...
>> 
>> What would be the sort key?
>
> Trivially, the hash of the parents itself. So you'd always get
>
> ...
> parent 0000
> parent 1111
> parent aaaa
> parent ffff

That would change the behavior of --first-parent. Or you'd need to
compute the sha1 of the sorted list, but keep the unsorted one in the
commit. Possible, but weird ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2012-11-09 15:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09 13:31 git merge commits are non-deterministic? what changed? Ulrich Spörlein
2012-11-09 15:04 ` Andreas Schwab
2012-11-09 15:42   ` Ulrich Spörlein
2012-11-09 15:52     ` Matthieu Moy [this message]
2012-11-09 16:16       ` Jeff King
2012-11-09 18:27         ` Ulrich Spörlein
2012-11-12 11:27           ` Michael J Gruber
2012-11-20 16:22             ` Ulrich Spörlein
2012-11-20 20:39               ` 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=vpq390idb8v.fsf@grenoble-inp.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=schwab@linux-m68k.org \
    --cc=uqs@spoerlein.net \
    /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.