git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matt Kraai <kraai@ftbfs.org>
To: git@vger.kernel.org
Cc: Matt Kraai <matt.kraai@amo.abbott.com>
Subject: [PATCH 1/2] Make lock local to fetch_pack
Date: Fri, 14 Dec 2012 10:38:19 -0800	[thread overview]
Message-ID: <1355510300-31541-2-git-send-email-kraai@ftbfs.org> (raw)
In-Reply-To: <1355510300-31541-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>
---
 fetch-pack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index 099ff4d..9d9762d 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -874,8 +874,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;
@@ -896,6 +894,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args,
 		       struct string_list *sought,
 		       char **pack_lockfile)
 {
+	static struct lock_file lock;
 	struct stat st;
 	struct ref *ref_cpy;
 
-- 
1.8.1-rc1

  reply	other threads:[~2012-12-14 18:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 18:38 [PATCH 0/2] Port to QNX Matt Kraai
2012-12-14 18:38 ` Matt Kraai [this message]
2012-12-15 18:40   ` [PATCH 1/2] Make lock local to fetch_pack Junio C Hamano
2012-12-15 19:31     ` Junio C Hamano
2012-12-14 18:38 ` [PATCH 2/2] Port to QNX Matt Kraai
2012-12-16  8:27   ` Joachim Schmitz
2012-12-15 18:38 ` [PATCH 0/2] " Junio C Hamano
2012-12-15 21:55   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=1355510300-31541-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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).