RFR: vcs: handle clean renames in combined diff parser

Erik Helin ehelin at openjdk.java.net
Mon Mar 30 11:00:23 UTC 2020

Hi all,

please review this patch that makes the combined diff parser handle "clean"
renames with regards to both parents. A clean rename is when the file is just
renamed, no lines in the files have changed. The problem is that git does not
output a `diff --combined` line, nor any hunks, for a clean rename. The combined
diff parser has been updated to detect this situation and then return empty hunk

I also added a bunch of state checks to the combined diff parser to help
diagnose future issues faster.

- `make test` passes on Linux x64
- Manual testing with large merge commits



Commit messages:
 - vcs: handle clean renames in combined diff parser

Changes: https://git.openjdk.java.net/skara/pull/549/files
 Webrev: https://webrevs.openjdk.java.net/skara/549/webrev.00
  Stats: 52 lines in 1 file changed: 45 ins; 0 del; 7 mod
  Patch: https://git.openjdk.java.net/skara/pull/549.diff
  Fetch: git fetch https://git.openjdk.java.net/skara pull/549/head:pull/549

PR: https://git.openjdk.java.net/skara/pull/549

More information about the skara-dev mailing list