aboutsummaryrefslogtreecommitdiff
path: root/builtin-config.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-10-10 23:14:35 +0100
committerShawn O. Pearce <spearce@spearce.org>2007-10-15 21:05:22 -0400
commit60fcc2e6ce255da1baa92905c10456981d260fa0 (patch)
tree458c6ad0e430f87432000c6dcf79905e3babfac8 /builtin-config.c
parent7b40a4552a0fbdc6ee9a22ce10408d79ca1599af (diff)
downloadgit-60fcc2e6ce255da1baa92905c10456981d260fa0.tar.gz
git-60fcc2e6ce255da1baa92905c10456981d260fa0.tar.xz
clear_commit_marks(): avoid deep recursion
Before this patch, clear_commit_marks() recursed for each parent. This could be potentially very expensive in terms of stack space. Probably the only reason that this did not lead to problems is the fact that we typically call clear_commit_marks() after marking a relatively small set of commits. Use (sort of) a tail recursion instead: first recurse on the parents other than the first one, and then continue the loop with the first parent. Noticed by Shawn Pearce. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-config.c')
0 files changed, 0 insertions, 0 deletions