From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH 06/11] git-fetch: Release objects used by a prior transport
Date: Fri, 9 Nov 2007 06:06:26 -0500 [thread overview]
Message-ID: <20071109110626.GF19368@spearce.org> (raw)
Some transports allocate objects in the internal object hashtable
during the fetch process (e.g. the HTTP commit walker and also the
native protocol). These shouldn't be visible to another transport
call running in the same fetch process when we fetch the tags during
automated tag following. By deallocating the object table (if it
has anything in it) we ensure the second transport execution will
be from a clean slate.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
builtin-fetch.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 847db73..18f123e 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -337,7 +337,10 @@ static void store_updated_refs(const char *url, struct ref *ref_map)
static int fetch_refs(struct transport *transport, struct ref *ref_map)
{
- int ret = transport_fetch_refs(transport, ref_map);
+ int ret;
+
+ free_all_objects();
+ ret = transport_fetch_refs(transport, ref_map);
if (!ret)
store_updated_refs(transport->url, ref_map);
transport_unlock_pack(transport);
--
1.5.3.5.1622.g41d10
next reply other threads:[~2007-11-09 11:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 11:06 Shawn O. Pearce [this message]
2007-11-09 22:27 ` [PATCH 06/11] git-fetch: Release objects used by a prior transport Junio C Hamano
2007-11-11 5:29 ` Shawn O. Pearce
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=20071109110626.GF19368@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.