mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 23:02:41 +01:00
Apply rtrim() to arc:upstream
Summary: Git spits these out with \n at the end.
Test Plan:
```
>>> orbital ~/devtools/arcanist $ git branch --set-upstream trim master
Branch trim set up to track local branch master.
>>> orbital ~/devtools/arcanist $ arc which --base arc:upstream
RELATIVE COMMIT
If you run 'arc diff', changes between the commit:
acf7600e6e
Temporarily restore apache/license linters
...and the current working copy state will be sent to Differential, because
it is the merge-base of the upstream of the current branch and HEAD, and
matched the rule 'arc:upstream' in your args 'base' configuration.
You can see the exact changes that will be sent by running this command:
$ git diff acf7600e6e728395..HEAD
These commits will be included in the diff:
3580555e4b30598f WIP
MATCHING REVISIONS
These Differential revisions match the changes in this working copy:
(No revisions match.)
Since there are no revisions in Differential which match this working copy, a
new revision will be created if you run 'arc diff'.
```
Reviewers: brennantaylor
Reviewed By: brennantaylor
CC: aran
Differential Revision: https://secure.phabricator.com/D4913
This commit is contained in:
parent
acf7600e6e
commit
446e5c4599
1 changed files with 2 additions and 0 deletions
|
@ -975,9 +975,11 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
|||
list($err, $upstream) = $this->execManualLocal(
|
||||
"rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'");
|
||||
if (!$err) {
|
||||
$upstream = rtrim($upstream);
|
||||
list($upstream_merge_base) = $this->execxLocal(
|
||||
'merge-base %s HEAD',
|
||||
$upstream);
|
||||
$upstream_merge_base = rtrim($upstream_merge_base);
|
||||
$this->setBaseCommitExplanation(
|
||||
"it is the merge-base of the upstream of the current branch ".
|
||||
"and HEAD, and matched the rule '{$rule}' in your {$source} ".
|
||||
|
|
Loading…
Reference in a new issue