Subject: Re: git diff-tree commit detail bug in 2.0.2 and 2.0.3

From: Jeff King <[email-masked]>
Date: Mon, 28 Jul 2014 06:44:09 -0400

On Mon, Jul 28, 2014 at 06:35:04AM -0400, Jeff King wrote:

> I haven't reproduced here yet, but this is almost certainly the bug
> where lookup_unknown_object causes a bogus commit->index field (and
> prior to the commit you found, diff-tree did not use commit->index).
> 
> The series that Junio has in jk/alloc-commit-id should fix the problem
> (it's in master already, and slated for v2.1.0).

Yep, that's definitely it. Here's the minimum reproduction:

  git init
  git commit --allow-empty -m one
  git commit --allow-empty -m two
  git rev-list HEAD | git diff-tree --stdin --always --format=%s

That yields:

  one
  one

on v2.0.3, but merging in jk/alloc-commit-id yields:

  two
  one

-Peff