Can you arc diff against a particular git branch?

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/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)