Subject: | Not able to successfully use command() with --grep option |
Date: | Thu, 25 Jul 2013 17:39:53 -0700 |
To: | bug-git-repository [...] rt.cpan.org |
From: | Jeff Anderson <jeffa [...] unlocalhost.com> |
Greetings,
I am unable to query my git repository logs with the --grep option. Please
consider the following code:
use Git::Repository 'Log';
my $location = '/tmp/foo.git';
my $r = Git::Repository->new( work_tree => $location );
my $since = '3-days-ago';
my $grep = 'report';
my $cmd = $r->command( log => "--since='$since'", "--grep='$grep'" );
print Dumper $cmd;
print $cmd->final_output();
# print nothing
$cmd = $r->command( log => "--since='$since'");
print Dumper $cmd;
print $cmd->final_output();
# prints all logs since including the one that clearly contains the term
'report'
Am i doing something wrong? Is this a bug? Has anyone else tried this yet
because i cannot find any previous cases where others have used --grep with
this (super awesome) module. I also tried run() and log() via the Log
plugin with no success, FWIW.
Thanks in advance!
jeffa