Page MenuHomePhabricator

Allow using arbitrary commits as top for arc diff
Closed, WontfixPublic

Description

Something like:
arc diff HEAD~4 HEAD~3

would be useful for incremental development...

Event Timeline

klimek raised the priority of this task from to Needs Triage.
klimek updated the task description. (Show Details)
klimek added a subscriber: klimek.
epriestley claimed this task.

We don't plan to support this, because we can not run unit tests or lint against a revision without a working copy. We also can't amend commits underneath HEAD easily.

You can use:

git diff HEAD~4 HEAD~3 | arc diff --raw

...or write a wrapper script which checks out $2, runs arc diff $1, and then checks out the old HEAD or something.

I was using 'git rebase' to edit the commit I wanted to update, but your idea of using arc diff --raw is much easier to script. Thanks.

Yeah, one approach is to use git rebase -i with "edit" to stop the working copy in various places. Personally, I just put each change on a branch-of-a-branch(-of-a-branch) rather than stacking different changes in the same local topic branch. --raw is a little less powerful, but easier than either of those approaches.