Permalink
Browse files

cope with old, dumb versions of git-status

  • Loading branch information...
rjbs committed Mar 31, 2012
1 parent 67da833 commit ab4dd1383b4258c102c6884ee4df1fcdb831943d
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Git/Wrapper.pm
View
@@ -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,

0 comments on commit ab4dd13

Please sign in to comment.