mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Explicitly use "--format=medium" when running 'git log'
Summary: Git (the world's hardest revision control system) allows you to change output formats by accident and/or without your direct knowledge. Protect users from themselves. Test Plan: Changed "pretty" in [format] to "format:quack" so every log just outputs the word "quack". Ran "arc diff" successfully. Reviewed By: aran Reviewers: aran CC: epriestley, aran Differential Revision: 56
This commit is contained in:
parent
4b30319747
commit
71016a09f8
1 changed files with 3 additions and 3 deletions
|
@ -119,11 +119,11 @@ class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
|||
$relative = $this->getRelativeCommit();
|
||||
if ($relative == self::GIT_MAGIC_ROOT_COMMIT) {
|
||||
list($stdout) = execx(
|
||||
'(cd %s; git log HEAD)',
|
||||
'(cd %s; git log --format=medium HEAD)',
|
||||
$this->getPath());
|
||||
} else {
|
||||
list($stdout) = execx(
|
||||
'(cd %s; git log %s..HEAD)',
|
||||
'(cd %s; git log --format=medium %s..HEAD)',
|
||||
$this->getPath(),
|
||||
$this->getRelativeCommit());
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
|||
|
||||
public function getGitHistoryLog() {
|
||||
list($stdout) = execx(
|
||||
'(cd %s; git log -n%d %s)',
|
||||
'(cd %s; git log --format=medium -n%d %s)',
|
||||
$this->getPath(),
|
||||
self::SEARCH_LENGTH_FOR_PARENT_REVISIONS,
|
||||
$this->getRelativeCommit());
|
||||
|
|
Loading…
Reference in a new issue