summaryrefslogtreecommitdiff
path: root/reachable.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-10-15 22:42:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-10-16 17:10:43 (GMT)
commitabcb86553d3ec4afffa4e3963089dffe0559740e (patch)
tree4ad24dfe7d40b7b079bd186a77bfabd3c0570f9e /reachable.h
parentd0d46abc167d18fdbdbf2ece8ca6df704517c62f (diff)
downloadgit-abcb86553d3ec4afffa4e3963089dffe0559740e.zip
git-abcb86553d3ec4afffa4e3963089dffe0559740e.tar.gz
git-abcb86553d3ec4afffa4e3963089dffe0559740e.tar.bz2
pack-objects: match prune logic for discarding objects
A recent commit taught git-prune to keep non-recent objects that are reachable from recent ones. However, pack-objects, when loosening unreachable objects, tries to optimize out the write in the case that the object will be immediately pruned. It now gets this wrong, since its rule does not reflect the new prune code (and this can be seen by running t6501 with a strategically placed repack). Let's teach pack-objects similar logic. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.h')
-rw-r--r--reachable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/reachable.h b/reachable.h
index 141fe30..d23efc3 100644
--- a/reachable.h
+++ b/reachable.h
@@ -2,6 +2,8 @@
#define REACHEABLE_H
struct progress;
+extern int add_unseen_recent_objects_to_traversal(struct rev_info *revs,
+ unsigned long timestamp);
extern void mark_reachable_objects(struct rev_info *revs, int mark_reflog,
unsigned long mark_recent, struct progress *);