4

We noticed that using git blame on a file in our repository fails with the above-mentioned message. I've traced the origin of the message to https://github.com/git/git/blob/master/blame.c#L1320 and the character (D) seems to indicate that the diff has a deleted status

I'm not exactly sure what this means. I would like to repair our repository so that we can blame the file again.

Emil Kantis
  • 1,069
  • 7
  • 17
  • This looks like a bug in `git blame`. That should be fixed, not your repository. Can you send a report to the Git mailing list `git@vger.kernel.org` and provide a repository that shows the problem? – j6t Jan 30 '20 at 11:58

1 Answers1

0

git fsck reported duplicate entries in some trees. We fixed that, and then git blame started working again. We follow the procedure described in the first answer here, using git fast-export to export and import the repository to get our duplicate entries fixed.

Emil Kantis
  • 1,069
  • 7
  • 17
  • 1
    Note that duplicate entries in a tree object are themselves an internal bug. I saw reports of this about a year ago, that seemed to be tied to MacOS, but then the reports stopped happening, as if there was some sort of broken version of Git for Mac for a short while. – torek Jan 30 '20 at 19:28