author | Junio Hamano <gitster@pobox.com> | |
Tue, 31 Mar 2009 04:34:14 +0000 (21:34 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 1 Apr 2009 19:35:12 +0000 (12:35 -0700) | ||
commit | 494fbfe87ade4658cb5c3a061a5be5d6f6496607 | |
tree | e9ab04ec030937eca79c333ced066dea6d7d689f | tree | snapshot |
parent | 666e07e69703c3930a60fbb1a74ed9923d293f16 | 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 |