From: Matt Kraai <kraai@ftbfs.org>
To: git@vger.kernel.org
Cc: Matt Kraai <matt.kraai@amo.abbott.com>
Subject: [PATCH v2 1/2] Make lock local to fetch_pack
Date: Tue, 18 Dec 2012 14:03:54 -0800 [thread overview]
Message-ID: <1355868235-23173-2-git-send-email-kraai@ftbfs.org> (raw)
In-Reply-To: <1355868235-23173-1-git-send-email-kraai@ftbfs.org>
From: Matt Kraai <matt.kraai@amo.abbott.com>
lock is only used by fetch_pack, so move it into that function.
Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
---
builtin/fetch-pack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index e644398..9bc10b3 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -875,8 +875,6 @@ static int fetch_pack_config(const char *var, const char *value, void *cb)
return git_default_config(var, value, cb);
}
-static struct lock_file lock;
-
static void fetch_pack_setup(void)
{
static int did_setup;
@@ -1069,6 +1067,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
ref_cpy = do_fetch_pack(fd, ref, sought, pack_lockfile);
if (args.depth > 0) {
+ static struct lock_file lock;
struct cache_time mtime;
struct strbuf sb = STRBUF_INIT;
char *shallow = git_path("shallow");
--
1.8.0.2.8.gc42826d.dirty
next prev parent reply other threads:[~2012-12-18 22:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 22:03 [PATCH v2 0/2] Port to QNX Matt Kraai
2012-12-18 22:03 ` Matt Kraai [this message]
2012-12-18 22:03 ` [PATCH v2 2/2] " Matt Kraai
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=1355868235-23173-2-git-send-email-kraai@ftbfs.org \
--to=kraai@ftbfs.org \
--cc=git@vger.kernel.org \
--cc=matt.kraai@amo.abbott.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).