]> git.ipfire.org Git - thirdparty/git.git/commit - fetch-pack.c
fetch-pack: use DEFINE_LIST_SORT
authorRené Scharfe <l.s.r@web.de>
Sat, 16 Jul 2022 16:59:59 +0000 (18:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Jul 2022 22:20:39 +0000 (15:20 -0700)
commit6fc9fec07bcaa6561aff5b485f1ac581f97a2428
treefaa2cb218c1fa4664d95175816ad01f9a693df42
parentc0fb5774a6435a46931ec58ac27a5623efba9449
fetch-pack: use DEFINE_LIST_SORT

Build a static typed ref sorting function using DEFINE_LIST_SORT along
with a typed comparison function near its only two callers instead of
having an exported version that calls llist_mergesort().  This gets rid
of the next pointer accessor functions and their calling overhead at the
cost of a slightly increased object text size.

Before:
__TEXT __DATA __OBJC others dec hex
23231 389 0 113689 137309 2185d fetch-pack.o
29158 80 0 146864 176102 2afe6 remote.o

With this patch:
__TEXT __DATA __OBJC others dec hex
23591 389 0 117759 141739 229ab fetch-pack.o
29070 80 0 145718 174868 2ab14 remote.o

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c
remote.c
remote.h