mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-23 22:10:54 +01:00
Read default relative commit from scratch file with newline
Summary: When people create the .arc/default-relative-commit scratchfile with $EDITOR of choice, their editor usually puts a newline at the end, which breaks arc diff. We should trim the newline before using the contents of the scratchfile. Test Plan: ran arc diff in a working copy that contained a .arc/default-relative-commit with a newline Reviewers: epriestley, jungejason Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2209
This commit is contained in:
parent
d2915d8c5f
commit
83ad377bdb
1 changed files with 1 additions and 0 deletions
|
@ -140,6 +140,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
|
|
||||||
if (!$default_relative) {
|
if (!$default_relative) {
|
||||||
$default_relative = $this->readScratchFile('default-relative-commit');
|
$default_relative = $this->readScratchFile('default-relative-commit');
|
||||||
|
$default_relative = trim($default_relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$default_relative) {
|
if (!$default_relative) {
|
||||||
|
|
Loading…
Reference in a new issue