Merge branch 'rs/sequencer-oidset-insert-avoids-dups'
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 Oct 2018 07:16:08 +0000 (16:16 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Oct 2018 07:16:08 +0000 (16:16 +0900)
Code clean-up.

* rs/sequencer-oidset-insert-avoids-dups:
  sequencer: use return value of oidset_insert()

sequencer.c

index ddb41a6..6387c9e 100644 (file)
@@ -4146,9 +4146,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);
                }