name-rev: don't _peek() in create_or_update_name()
commitd689d6d82fae2f4f948bf1c232cb1fe158e3f319
authorRené Scharfe <l.s.r@web.de>
Tue, 4 Feb 2020 21:20:42 +0000 (4 22:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Feb 2020 18:24:15 +0000 (5 10:24 -0800)
treef2187f4f2708db210664dc74ac9fb79c3b4bcfa4
parent15a4205d967111856279993b8aca24d4ffae787b
name-rev: don't _peek() in create_or_update_name()

Look up the commit slab slot for the commit once using
commit_rev_name_at() and populate it in case it is empty, instead of
checking for emptiness in a separate step using commit_rev_name_peek()
via get_commit_rev_name().

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/name-rev.c