Re: git merge commits are non-deterministic? what changed?
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Nov 9, 2012, 15:52 UTC
- Message-ID
- <vpq390idb8v.fsf@grenoble-inp.fr>
- In-Reply-To
- <20121109154245.GP69724@acme.spoerlein.net>
Ulrich Spörlein <uqs@spoerlein.net> writes:
Show 13 quoted lines
>> > 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/