git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Charles Bailey <charles@hashpling.org>
Cc: git@vger.kernel.org, Deskin Miller <deskinm@umich.edu>,
	kenneth johansson <ken@kenjo.org>,
	gitster@pobox.com
Subject: Re: [PATCH] Fixed git archive for bare repos
Date: Sat, 25 Oct 2008 00:19:49 +0200	[thread overview]
Message-ID: <49024A05.3090100@lsrfire.ath.cx> (raw)
In-Reply-To: <1224712023-5280-1-git-send-email-charles@hashpling.org>

Charles Bailey schrieb:
> 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.

If one combines your patch, Deskin's commit message and test and extends
on the latter a bit then I think we have a winner. :)

Here are a few more tests which create a ZIP file in addition to a tar
archive and compare them to their non-bare counterparts.

Care to resend?

Thanks,
René


 t/t5000-tar-tree.sh |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index e395ff4..bf5fa25 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -58,6 +58,11 @@ test_expect_success \
      git commit-tree $treeid </dev/null)'
 
 test_expect_success \
+    'create bare clone' \
+    'git clone --bare . bare.git &&
+     cp .gitattributes bare.git/info/attributes'
+
+test_expect_success \
     'remove ignored file' \
     'rm a/ignored'
 
@@ -74,6 +79,14 @@ test_expect_success \
     'diff b.tar b2.tar'
 
 test_expect_success \
+    'git archive in a bare repo' \
+    '(cd bare.git && git archive HEAD) >b3.tar'
+
+test_expect_success \
+    'git archive vs. the same in a bare repo' \
+    'test_cmp b.tar b3.tar'
+
+test_expect_success \
     'validate file modification time' \
     'mkdir extract &&
      "$TAR" xf b.tar -C extract a/a &&
@@ -151,6 +164,14 @@ test_expect_success \
     'git archive --format=zip' \
     'git archive --format=zip HEAD >d.zip'
 
+test_expect_success \
+    'git archive --format=zip in a bare repo' \
+    '(cd bare.git && git archive --format=zip HEAD) >d1.zip'
+
+test_expect_success \
+    'git archive --format=zip vs. the same in a bare repo' \
+    'test_cmp d.zip d1.zip'
+
 $UNZIP -v >/dev/null 2>&1
 if [ $? -eq 127 ]; then
 	echo "Skipping ZIP tests, because unzip was not found"

  parent reply	other threads:[~2008-10-24 22:21 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         ` [PATCH] Fixed git archive for bare repos Charles Bailey
2008-10-23  1:37           ` Deskin Miller
2008-10-24 22:19           ` René Scharfe [this message]
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=49024A05.3090100@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=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).