git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jan Harkes <jaharkes@cs.cmu.edu>
Date
Oct 26, 2005, 04:26 UTC
Message-ID
<20051026042632.GA3059@delft.aura.cs.cmu.edu>

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;
 		}
Next: Junio C Hamano
Message 1 of 2 in “fetch-pack: avoid packing reachable objects.”
  1. fetch-pack: avoid packing reachable objects.Jan Harkes, Oct 26, 2005
  2. Junio C HamanoOct 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.