Merge pull request #498 from fauxpark/commit-search-case-sens

Made search functions case insensitive
This commit is contained in:
Klaus Silveira
2014-11-14 11:02:35 -02:00

View File

@@ -243,7 +243,7 @@ class Repository extends BaseRepository
$query = escapeshellarg($query); $query = escapeshellarg($query);
$query = strtr($query, array('[' => '\\[', ']' => '\\]')); $query = strtr($query, array('[' => '\\[', ']' => '\\]'));
$command = $command =
"log --grep={$query} --pretty=format:\"<item><hash>%H</hash>" "log --grep={$query} -i --pretty=format:\"<item><hash>%H</hash>"
. "<short_hash>%h</short_hash><tree>%T</tree><parents>%P</parents>" . "<short_hash>%h</short_hash><tree>%T</tree><parents>%P</parents>"
. "<author>%an</author><author_email>%ae</author_email>" . "<author>%an</author><author_email>%ae</author_email>"
. "<date>%at</date><commiter>%cn</commiter>" . "<date>%at</date><commiter>%cn</commiter>"
@@ -271,7 +271,7 @@ class Repository extends BaseRepository
$query = escapeshellarg($query); $query = escapeshellarg($query);
try { try {
$results = $this->getClient()->run($this, "grep -I --line-number {$query} $branch"); $results = $this->getClient()->run($this, "grep -i --line-number {$query} $branch");
} catch (\RuntimeException $e) { } catch (\RuntimeException $e) {
return false; return false;
} }