diff options
author | Jayati Shrivastava <gaurijove@gmail.com> | 2022-03-16 11:20:23 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-16 08:39:16 -0700 |
commit | 5327d8982a467c0043d2900d2afcfc21ef14820e (patch) | |
tree | 89d341968461b0aee96e0b80956de1bbe0768ed0 /cache.h | |
parent | Git 2.35.1 (diff) | |
download | tgif-5327d8982a467c0043d2900d2afcfc21ef14820e.tar.xz |
sequencer: use reverse_commit_list() helper
Instead of creating a new allocation, reverse the original list
in-place by calling the reverse_commit_list() helper.
The original code discards the list "bases" after storing its
reverse copy in a newly created list "reversed". If the code that
followed from here used both "bases" and "reversed", the
modification would not have worked, but since the original list
"bases" gets discarded, we can simply reverse "bases" in-place with
the reverse_commit_list() helper and reuse the same variable in the
code that follows.
builtin/merge.c has been left unmodified, since in its case, the
original list is needed separately from its reverse copy by the
code.
Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
0 files changed, 0 insertions, 0 deletions