]> git.ipfire.org Git - thirdparty/git.git/commit
Revert "name-rev: release unused name strings"
authorRené Scharfe <l.s.r@web.de>
Fri, 22 Apr 2022 18:44:40 +0000 (20:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 23 Apr 2022 16:46:40 +0000 (09:46 -0700)
commit45a14f578e14ef5440d4bf971a9103795dac0c3a
tree03880ca257044c8a227f7de86422193530284af3
parent3656f842789d25d75da41c6c029470052a573b54
Revert "name-rev: release unused name strings"

This reverts commit 2d53975488df195e1431c3f90bfb5b60018d5bf6.

3656f84278 (name-rev: prefer shorter names over following merges,
2021-12-04) broke the assumption of 2d53975488 (name-rev: release unused
name strings, 2020-02-04) that a better name for a child is a better
name for all of its ancestors as well, because it added a penalty for
generation > 0.  This leads to strings being free(3)'d that are still
needed.

079f970971 (name-rev: sort tip names before applying, 2020-02-05)
already reduced the number of free(3) calls for the use case that
motivated the original patch (name-rev --all in the Chromium repository)
from ca. 44000 to 5, and 3656f84278 eliminated even those few.  So this
revert won't affect name-rev's performance on that particular repo.

Reported-by: Thomas Hurst <tom@hur.st>
Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/name-rev.c