git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Bailey <charles@hashpling.org>
To: git@vger.kernel.org
Cc: Deskin Miller <deskinm@umich.edu>,
	kenneth johansson <ken@kenjo.org>,
	gitster@pobox.com
Subject: [PATCH] Fixed git archive for bare repos
Date: Wed, 22 Oct 2008 22:47:03 +0100	[thread overview]
Message-ID: <1224712023-5280-1-git-send-email-charles@hashpling.org> (raw)
In-Reply-To: <20081022210913.GB22541@hashpling.org>

This moves the call to git config to a place where it doesn't break the
logic for using git archive in a bare repository but retains the fix to
make git archive respect core.autocrlf.

Signed-off-by: Charles Bailey <charles@hashpling.org>
---

OK, I've had a chance to have a quick look at this issue and I have an
altenative patch.

This is an alternative fix to the current git archive in a bare
repository issue.

It's been lightly tested and doesn't re-break the zip / autocrlf issue
that the previous introduction of git_config was designed to fix.

 archive.c         |    2 ++
 builtin-archive.c |    2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/archive.c b/archive.c
index 849eed5..9ac455d 100644
--- a/archive.c
+++ b/archive.c
@@ -336,5 +336,7 @@ int write_archive(int argc, const char **argv, const char *prefix,
 	parse_treeish_arg(argv, &args, prefix);
 	parse_pathspec_arg(argv + 1, &args);
 
+	git_config(git_default_config, NULL);
+
 	return ar->write_archive(&args);
 }
diff --git a/builtin-archive.c b/builtin-archive.c
index 432ce2a..5ceec43 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -111,8 +111,6 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
 {
 	const char *remote = NULL;
 
-	git_config(git_default_config, NULL);
-
 	remote = extract_remote_arg(&argc, argv);
 	if (remote)
 		return run_remote_archiver(remote, argc, argv);
-- 
1.6.0.2.534.g5ab59

  reply	other threads:[~2008-10-22 21:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22  8:42 git archive kenneth johansson
2008-10-22 13:08 ` Deskin Miller
2008-10-22 18:45   ` kenneth johansson
2008-10-22 20:37     ` [RFC PATCH] archive: fix setup to work in bare repositories Deskin Miller
2008-10-22 20:46       ` Jeff King
2008-10-22 21:09       ` Charles Bailey
2008-10-22 21:47         ` Charles Bailey [this message]
2008-10-23  1:37           ` [PATCH] Fixed git archive for bare repos Deskin Miller
2008-10-24 22:19           ` René Scharfe
2008-10-25 15:38             ` [PATCH v2] " Deskin Miller
2008-10-25 19:15               ` Junio C Hamano
2008-10-23 15:33   ` git archive Nguyen Thai Ngoc Duy
2008-10-23 18:21     ` Deskin Miller
2008-10-24  3:58       ` Nguyen Thai Ngoc Duy

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=1224712023-5280-1-git-send-email-charles@hashpling.org \
    --to=charles@hashpling.org \
    --cc=deskinm@umich.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ken@kenjo.org \
    /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).