Fix crash when filtering unrelated histories by refs
This is a sort of weird condition.
Consider repository main-repo, into which, at some point, another repository side-repo was merged via --allow-unrelated-histories. main-repo now has two root commits and two histories that converge at some point.
Next, pick a commit from side-repo's own history, tag it with side-tag for convenience.
If you want to filter by --refs=side-tag..HEAD, for example, i.e., the selection starts inside side-repo's history, then the output from fast-export is not sorted ideally. I forget the details right now, it made sense at the time ... in any case, the result is that an entry in parents can be an untranslated commit hash instead of ID.
So line 3461 will fail because ID_TO_HASH[parent] does not exist.
Fortunately we don't actually care because get_file_changes wants a commit hash, so it's sufficient to use the raw entry.
Wow, nice find! Thanks so much for digging this down and sending in a PR!
And I'm sorry for being so slow to respond.
In any event, I really need the Signed-off-by line in the commit message before I can merge. If you can amend and add that, I'll be happy to merge it!
thanks for your response :) this works, I hope? b07b17fcea556cd5b166bc920a0662f23817b9bd
this works, I hope?
That's almost what I need, but it looks like you used a username rather than a real name. Is that right? As per https://github.com/git/git/blob/4fd6c5e44459e6444c2cd93383660134c95aabd1/Documentation/SubmittingPatches#L284-L286, I need a real name for author/committer/signoff.