Can be compressed into

```c
if (rb_exception != Qnil)
    rb_exc_raise(rb_exception);

rugged_exception_check(git_error);
```