]> git.armaanb.net Git - stagit.git/commitdiff
simplify, id is unused
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 7 May 2016 12:38:39 +0000 (14:38 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 7 May 2016 12:38:39 +0000 (14:38 +0200)
stagit.c

index 6a79573fe2791ce9cd83916d203f6797381b7cbc..bb7cd738343b63541cc66c117d487aec9ab7f386 100644 (file)
--- 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;