In general, arc diff <branch>
will do what you want. (If you're already on the branch, rather than a local topic branch, try arc diff origin/<branch>
instead.)
When invoked like this, arc
will actually diff against the merge-base
of the branch's tip and the current commit in the working copy, but generally this is what you intend. If you really want to generate a diff against the branch tip you can use arc diff --base git:<branch>
, but this diff will include changes which undo any commits on the branch
which are descendants of the branch point, just like git diff <branch>..HEAD
would.
In all cases, you can use arc which <commit>
to preview what arc diff
will do. This will explain which revision range would be selected, show you the command to see exactly which changes are included, and explain why that range is selected.
You can also use arc diff --preview
to generate just a diff, without sending it for review. This will let you preview changes before submitting them to anyone else.
See also:
https://secure.phabricator.com/book/phabricator/article/arcanist_commit_ranges/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…