Skip to content

Exit on invalid diff status of diff_filepair

Jake Roggenbuck git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Exit on invalid diff status of diff_filepairdiff.c+4 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] Exit on invalid diff status of diff_filepair

Hi all,

Git showed that object files were empty, so I manually removed them. After removing a few object files, I ran git diff and I got a segfault.

I have since narrowed down the source of the error to a usage of diff_filepair. I also noticed that the status field of diff_filepair does not get set and stays a zero value. My fix is to check for that invalid status character and exit gracefully with an error message.

I modeled the behavior of this patch after what git log does in the same situation. git log will exit with a message that reads bad object HEAD.

I initially found this segfault when using git while working on a school assignment. I am really interested in helping fix this segfault. I'd be happy to hear any feedback.

Thank you!

Jake Roggenbuck (1):
Exit on invalid diff status of diff_filepair

 diff.c | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
2.47.0