summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stagit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stagit.c b/stagit.c
index 6a79573..bb7cd73 100644
--- a/stagit.c
+++ b/stagit.c
@@ -940,9 +940,8 @@ writerefs(FILE *fp)
default:
continue;
}
- if (!(id = git_reference_target(r)))
- goto err;
- if (git_reference_peel(&obj, r, GIT_OBJ_ANY))
+ if (!git_reference_target(r) ||
+ git_reference_peel(&obj, r, GIT_OBJ_ANY))
goto err;
if (!(id = git_object_id(obj)))
goto err;