DORMANTno replies

[PATCH] fetch-pack: avoid packing reachable objects.

From: Jan Harkes <jaharkes@cs.cmu.edu>
Date: 2016-06-15 22:42:09
Subsystem: the rest · Maintainer: Linus Torvalds

Mark remote commits that were found in the alternate repository as
COMPLETE and avoid unnecessary packing of already available objects.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
---

When we pull updates from a shared repository into a clone that was
created with 'git clone -l -s', we pack objects that are already
reachable. This was because we only marked local refs as COMPLETE.
diff --git a/fetch-pack.c b/fetch-pack.c
index 8566ab1..17524d8 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -169,6 +169,7 @@ static int everything_local(struct ref *
 		 */
 		if (o->type == commit_type) {
 			struct commit *commit = (struct commit *)o;
+			commit->object.flags |= COMPLETE;
 			if (!cutoff || cutoff < commit->date)
 				cutoff = commit->date;
 		}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help