]> git.ipfire.org Git - thirdparty/git.git/commit
refs/files: sort reflogs returned by the reflog iterator
authorPatrick Steinhardt <ps@pks.im>
Wed, 21 Feb 2024 12:37:27 +0000 (13:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Feb 2024 17:58:05 +0000 (09:58 -0800)
commite69e8ffef7369ca0d24c570d2657e41cf5e45936
treec1411b72ebf3c4d434267a4f2d8c815bf073c3d4
parentde34f2651ecca00dffeb61934253345150a1cc32
refs/files: sort reflogs returned by the reflog iterator

We use a directory iterator to return reflogs via the reflog iterator.
This iterator returns entries in the same order as readdir(3P) would and
will thus yield reflogs with no discernible order.

Set the new `DIR_ITERATOR_SORTED` flag that was introduced in the
preceding commit so that the order is deterministic. While the effect of
this can only been observed in a test tool, a subsequent commit will
start to expose this functionality to users via a new `git reflog list`
subcommand.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c
t/t0600-reffiles-backend.sh
t/t1405-main-ref-store.sh
t/t1406-submodule-ref-store.sh