HomeSoftware Heritage

Do not use /dev/null in the "git diff" header line

Description

Do not use /dev/null in the "git diff" header line

The documentation
https://git-scm.com/docs/diff-format#_generating_patches_with_p indicates
that: "The a/ and b/ filenames are the same unless rename/copy is involved.
Especially, even for a creation or a deletion, /dev/null is not used in place
of the a/ or b/ filenames."

Update gen_diff_header to match the documentation and CGit behavior.

With this commit, the test applying the git diff using CGit now pass. The next
commit is an additional cleanup to match CGit behavior.

Details

Provenance
Boris Feld <lothiraldan@gmail.com>Authored on Apr 1 2019, 6:18 PM
ardumontPushed on Sep 27 2021, 5:34 PM
Parents
rPPDW25988367ca2f: Update git diff mode extended header line
Branches
Unknown
Tags
Unknown

Event Timeline