From 6e8fc70fcefd4c362142c7d437488d3fbfdc22a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Wed, 3 Oct 2018 15:06:49 +0200 Subject: sequencer: use return value of oidset_insert() oidset_insert() returns 1 if the object ID is already in the set and doesn't add it again, or 0 if it hadn't been present. Make use of that fact instead of checking with an extra oidset_contains() call. Signed-off-by: Rene Scharfe Acked-by: Johannes Schindelin Signed-off-by: Junio C Hamano diff --git a/sequencer.c b/sequencer.c index dc2c58d..3efb8d9 100644 --- a/sequencer.c +++ b/sequencer.c @@ -4131,9 +4131,7 @@ static int make_script_with_merges(struct pretty_print_context *pp, struct object_id *oid = &parent->item->object.oid; if (!oidset_contains(&interesting, oid)) continue; - if (!oidset_contains(&child_seen, oid)) - oidset_insert(&child_seen, oid); - else + if (oidset_insert(&child_seen, oid)) label_oid(oid, "branch-point", &state); } -- cgit v0.10.2-6-g49f6