Skip to content

Commit

Permalink
Add project level setting for determining base commit in arc diff
Browse files Browse the repository at this point in the history
Summary:
This is a complex thing to do perfectly. So for now keep it simple. By default
look to capture all the commits that are not in `origin/master` when making a
diff. If we can't figure that out, ask for a base commit to use. See the
upstream doc[1] on this for a more complete discussion.

[1]: https://secure.phabricator.com/book/phabricator/article/arcanist_commit_ranges/

Test Plan:
- Create a dummy branch from `master`
- Create some dummy commits on the dummy branch
- Run `arc diff` and see what it grabs automatically (or run `arc which --base 'git:merge-base(origin/master)'` if you want zero chance of accidentally making a diff)
- Delete the message and close the buffer to cancel actually making a diff from the dummy stuff if you ran `arc diff`
- Rejoice that it figured this out correctly

Reviewers: sethetter

Reviewed By: sethetter

Differential Revision: https://phabricator.opengovfoundation.org/D3
  • Loading branch information
doshitan committed Sep 13, 2016
1 parent e65af0c commit 53c4535
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .arcconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"phabricator.uri" : "https://phabricator.opengovfoundation.org/"
"phabricator.uri": "https://phabricator.opengovfoundation.org/",
"base": "git:merge-base(origin/master), arc:prompt"
}

0 comments on commit 53c4535

Please sign in to comment.