diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2019-11-12 11:38:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 13:29:04 -0800 |
commit | 3a521503019de7ca0c550c3861619bb8881c388c (patch) | |
tree | e3195bafd13fdac1c8251a553af70a32bd694c12 /ref-filter.h | |
parent | name-rev: restructure parsing commits and applying date cutoff (diff) | |
download | tgif-3a521503019de7ca0c550c3861619bb8881c388c.tar.xz |
name-rev: restructure creating/updating 'struct rev_name' instances
At the beginning of the recursive name_rev() function it creates a new
'struct rev_name' instance for each previously unvisited commit or, if
this visit results in better name for an already visited commit, then
updates the 'struct rev_name' instance attached to the commit, or
returns early.
Restructure this so it's caller creates or updates the 'struct
rev_name' instance associated with the commit to be passed as
parameter, i.e. both name_ref() before calling name_rev() and
name_rev() itself as it iterates over the parent commits.
This makes eliminating the recursion a bit easier to follow, and the
condition moved to name_ref() will be moved back to name_rev() after
the recursion is eliminated.
This change also plugs the memory leak that was temporarily unplugged
in the earlier "name-rev: pull out deref handling from the recursion"
patch in this series.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.h')
0 files changed, 0 insertions, 0 deletions