In D11193, I am seeing the old file expanded and the new file collapsed.
Description
Revisions and Commits
Related Objects
Event Timeline
Do you have a way to reproduce this? I'm not totally sure that D11970 fixes this, it just fixes every case I was able to identify.
Oh, I think this is related to the magic "fill in missing context" stuff we do, since downloading and then re-creating the diff doesn't reproduce the issue:
https://secure.phabricator.com/differential/diff/28850/
The sequence of commands you used to generate that was something like this?
$ git mv a b $ git commit -m blah $ arc diff HEAD^ --only
Yeah, that repro'd things:
https://secure.phabricator.com/differential/diff/28851/
This remains broken after D11970, but is hard to test because I think there is no raw diff input which can generate the internal diff which causes the issue.
If you do this:
$ git mv a b $ git commit -m blah $ git diff HEAD^ -M | arc diff --raw # <-- Not "arc diff"!
...you get this:
If you do this for the last line:
$ arc diff HEAD^ --only
...you get this:
The reason they're different is that that the arc diff version has been enhanced with synthetic metadata via ArcanistDiffParser->loadSyntheticData().
There's no valid plain-text diff which any diff program understands that represents "move + synthetic augment", so it's hard to unit test, since we can't easily encode it as a unit test input.
That is, the git diff output is this:
diff --git a/README b/README.moved
similarity index 100%
rename from README
rename to README.moved
What arc actually sends up is something like this:
diff --git a/README b/README.moved similarity index 100% rename from README rename to README.moved @@ blah blah @@ - each - line - of - the - old - file
...except it sends it up in a parsed format, and that isn't a valid git diff anyway.