зеркало из https://github.com/microsoft/git.git
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 <l.s.r@web.de> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
1d4361b0f3
Коммит
6e8fc70fce
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче