summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-16 07:16:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-16 07:16:08 (GMT)
commit488e2e8ff53091669988cbec7fe29abb08aea406 (patch)
tree776bd4755678151550b34bbbef8f717105d2615b
parentee56992a8792cd5e67029e71f3c75d7ce662ae6d (diff)
parent6e8fc70fcefd4c362142c7d437488d3fbfdc22a8 (diff)
downloadgit-488e2e8ff53091669988cbec7fe29abb08aea406.zip
git-488e2e8ff53091669988cbec7fe29abb08aea406.tar.gz
git-488e2e8ff53091669988cbec7fe29abb08aea406.tar.bz2
Merge branch 'rs/sequencer-oidset-insert-avoids-dups'
Code clean-up. * rs/sequencer-oidset-insert-avoids-dups: sequencer: use return value of oidset_insert()
-rw-r--r--sequencer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index ddb41a6..6387c9e 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -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);
}