mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
arc amend: fix failure when amending merge commit
Summary: The amend process used "git log HEAD^..HEAD" to get log for the commit being amended. When run on a merge commit this can return any number of commits from the non-first parents. Since only a single commit was expected, arc fails here. This diff changes the amend process to use the '--first-parent' flag to be consistent with using '^', which references the first parent. This should guarantee a single commit log every time. Test Plan: arc amend on a merge commit Reviewed By: epriestley Reviewers: epriestley, jungejason CC: aran, epriestley, andrewjcg Differential Revision: 415
This commit is contained in:
parent
9b7ee674eb
commit
ffbc7aae62
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
$this->getPath());
|
$this->getPath());
|
||||||
} else {
|
} else {
|
||||||
list($stdout) = execx(
|
list($stdout) = execx(
|
||||||
'(cd %s; git log --format=medium %s..HEAD)',
|
'(cd %s; git log --first-parent --format=medium %s..HEAD)',
|
||||||
$this->getPath(),
|
$this->getPath(),
|
||||||
$this->getRelativeCommit());
|
$this->getRelativeCommit());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue