In the case of the merge diff fix we now check if $parent has
something to be compared against before making a comparison.
The case of the t/00git_version.t fix is a little more
interesting. For reasons I don't fully understand running a program
which writes to stdout in scalar context has $! is set to 9 (aka
"Bad file descriptor"). Something to do with close-on-exec I think.
# If we're not comparing against something and we have multiple
# parents then it's a merge commit so show what was merged.
- my $sha1 = $parent eq '-c' && @{[$self->parents]} > 1
+ my $sha1 = $parent && $parent eq '-c' && @{[$self->parents]} > 1
? sprintf("%s^1..%s^2", ($self->sha1) x 2)
: $self->sha1;
use Test::More;
-my $ver = `git --version`;
+my($ver) = `git --version`;
ok !$!;
ok $ver;
warn "Git version: $ver";