author | Junio Hamano <gitster@pobox.com> | |
Tue, 31 Mar 2009 04:34:14 +0000 (21:34 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 19 Apr 2009 19:31:56 +0000 (12:31 -0700) | ||
commit | 24cb1bb1984be60addeecaf0bf5d16cd9688e6a7 | |
tree | 461645df5749387a1c0cc11642d610865cab539a | tree | snapshot |
parent | 9ffb15d52a33444652c136681c0b720547c43cbe | commit | diff |
Speed up reflog pruning of unreachable commits
Instead of doing the (potentially very expensive) "in_merge_base()"
check for each commit that might be pruned if it is unreachable, do a
preparatory reachability graph of the commit space, so that the common
case of being reachable can be tested directly.
[ Cleaned up a bit and tweaked to actually work. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Instead of doing the (potentially very expensive) "in_merge_base()"
check for each commit that might be pruned if it is unreachable, do a
preparatory reachability graph of the commit space, so that the common
case of being reachable can be tested directly.
[ Cleaned up a bit and tweaked to actually work. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reflog.c | diff | blob | history |