git-query
git data extraction tool using c and libgit2
git clone https://9o.is/git/git-query.git
commit 1ef2dd27cc138f8bb99e843c5d109062ed1782b7 parent 2f0d976726c126e41ee68201c39a97cd1e3c5cf6 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 7 May 2016 14:38:39 +0200 simplify, id is unused Diffstat:
| M | stagit.c | | | 5 | ++--- |
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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;