]> khamidou — GitHub mirrors - arcanist.git/commit
Implement "git:branch-unique(*)" in the base commit DSL
authorepriestley <git@epriestley.com>
Wed, 27 Jun 2012 19:12:39 +0000 (12:12 -0700)
committerepriestley <git@epriestley.com>
Wed, 27 Jun 2012 19:12:39 +0000 (12:12 -0700)
commit98b3dfda3bf460ce3f5bb9af6258ed95405c5633
tree83eb1af931dc0dc411d56bc1c51a39ea423eeb54
parent33e53a2852a845088d9057294072d454489515fd
Implement "git:branch-unique(*)" in the base commit DSL

Summary:
Add a DSL command to select the first commit between HEAD and (the merge-base of some target with HEAD) that's on more than one branch.

This is similar to @csilvers' suggestion in <https://secure.phabricator.com/T1233#comment-8>. A specific problem this address is that, currently, if you use this workflow:

  $ git checkout -b feature
  $ git commit
  $ git checkout -b subfeature
  $ git commit

..i.e., develop dependent features in sub-branches, "arc diff" will try to send up (feature + subfeature). If you use the rule 'git:branch-unique(origin/master)' instead, diffing from 'subfeature' will correctly select only the commit(s) on 'subfeature'.

Test Plan: Constructed feature/subfeature branches, verified that we select the correct base commit.

Reviewers: dschleimer, csilvers, btrahan, jungejason

Reviewed By: dschleimer

CC: aran
Maniphest Tasks: T1233

Differential Revision: https://secure.phabricator.com/D2866
src/repository/api/ArcanistGitAPI.php