Skip to content

Commit

Permalink
[git-describe] Ignore $committish if omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
kzykhys committed Feb 15, 2014
1 parent 4b248eb commit 3c4db98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/PHPGit/Command/DescribeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public function __invoke($committish = null, array $options = array())

$this->addFlags($builder, $options, array());

$builder->add($committish);
if ($committish) {
$builder->add($committish);
}

return trim($this->git->run($builder->getProcess()));
}
Expand Down Expand Up @@ -85,4 +87,4 @@ public function setDefaultOptions(OptionsResolver $resolver)
));
}

}
}

0 comments on commit 3c4db98

Please sign in to comment.