summaryrefslogtreecommitdiff
path: root/dir-iterator.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-11-12 10:38:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-06 21:29:04 (GMT)
commitdd432a6ecf022b40760dd04fe4e94fdfcb1b270d (patch)
tree0c69e0164f8cad94afc38cdcb1e8b75007f88dc2 /dir-iterator.c
parentdd090a8a37b4507bf6c79ad93ec076673fa6313c (diff)
downloadgit-dd432a6ecf022b40760dd04fe4e94fdfcb1b270d.zip
git-dd432a6ecf022b40760dd04fe4e94fdfcb1b270d.tar.gz
git-dd432a6ecf022b40760dd04fe4e94fdfcb1b270d.tar.bz2
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 'dir-iterator.c')
0 files changed, 0 insertions, 0 deletions