Skip to content

Commit

Permalink
when #check_applies fails, add the exitstatus to the accumulated stat…
Browse files Browse the repository at this point in the history
…us return value
  • Loading branch information
technoweenie committed Jan 13, 2011
1 parent 6684afe commit 3392866
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/grit/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ def check_applies(head_sha, applies_sha)
native(:read_tree, options.dup, head_sha)
stdin = native(:diff, options.dup, "#{applies_sha}^", applies_sha)
native(:apply, options.merge(:check => true, :cached => true, :input => stdin))
rescue CommandFailed
status += 1
rescue CommandFailed => fail
status += fail.exitstatus
end
status
end
Expand Down

0 comments on commit 3392866

Please sign in to comment.