Page MenuHomePhabricator

arc diff automatic detection of last commit which was not part of any revision
Closed, ResolvedPublic

Asked by DheerendraRathor on Sep 25 2015, 6:39 PM.

Details

I'm using git with Arcanist. I know I can specify the commit range for creating differential revisions, but is there any arc rule by which arc can automatically determine the last commit not included in any revision?

Answers

epriestley
Updated 3,372 Days Ago

There is no such rule.

I don't think such a rule would work, anyway. If you did: commit A, arc diff, commit B, arc diff, it could not tell whether you meant to create a new revision or update the previous revision to include B.

The git:branch-unique() rule finds the last commit on different branches than HEAD. With this rule, you can distinguish between the two cases:

  • commit A, arc diff, commit B, arc diff: create revision with A, then update it to include A + B.
  • commit A, arc diff, create new branch, commit B, arc diff: creates a revision with A, then create a second revision with B

This also makes it easier to make changes to the revision with "A" later.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.