diff --git a/lib/grit/git.rb b/lib/grit/git.rb index c84c3a45..9ea19949 100644 --- a/lib/grit/git.rb +++ b/lib/grit/git.rb @@ -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