summaryrefslogtreecommitdiff
path: root/convert.h
diff options
context:
space:
mode:
authorLibravatar SZEDER Gábor <szeder.dev@gmail.com>2019-11-12 11:38:17 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-12-06 13:29:04 -0800
commitdd432a6ecf022b40760dd04fe4e94fdfcb1b270d (patch)
tree0c69e0164f8cad94afc38cdcb1e8b75007f88dc2 /convert.h
parentname-rev: pull out deref handling from the recursion (diff)
downloadtgif-dd432a6ecf022b40760dd04fe4e94fdfcb1b270d.tar.xz
name-rev: restructure parsing commits and applying date cutoff
At the beginning of the recursive name_rev() function it parses the commit it got as parameter, and returns early if the commit is older than a cutoff limit. Restructure this so the caller parses the commit and checks its date, and doesn't invoke name_rev() if the commit to be passed as parameter is older than the cutoff, 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. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'convert.h')
0 files changed, 0 insertions, 0 deletions