Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cope with old, dumb versions of git-status

  • Loading branch information...
commit ab4dd1383b4258c102c6884ee4df1fcdb831943d 1 parent 67da833
@rjbs rjbs authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Git/Wrapper.pm
View
8 lib/Git/Wrapper.pm
@@ -93,7 +93,13 @@ sub RUN {
print "status: $?\n" if $DEBUG;
- if ($?) {
+ # In earlier gits (1.5, 1.6, I'm not sure when it changed), "git status"
+ # would exit 1 if there was nothing to commit, or in other cases. This is
+ # basically insane, and has been fixed, but if we don't require git 1.7, we
+ # should cope with it. -- rjbs, 2012-03-31
+ my $stupid_status = $cmd eq 'status' && @out && ! @err;
+
+ if ($? && ! $stupid_status) {
die Git::Wrapper::Exception->new(
output => \@out,
error => \@err,
Please sign in to comment.
Something went wrong with that request. Please try again.