Git development
 help / color / mirror / Atom feed
From: Jan Harkes <jaharkes@cs.cmu.edu>
To: git@vger.kernel.org, junkio@cox.net
Subject: [PATCH] fetch-pack: avoid packing reachable objects.
Date: Wed, 26 Oct 2005 00:26:32 -0400	[thread overview]
Message-ID: <20051026042632.GA3059@delft.aura.cs.cmu.edu> (raw)

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;
 		}

             reply	other threads:[~2005-10-26  4:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26  4:26 Jan Harkes [this message]
2005-10-26  5:07 ` [PATCH] fetch-pack: avoid packing reachable objects Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051026042632.GA3059@delft.aura.cs.cmu.edu \
    --to=jaharkes@cs.cmu.edu \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox