git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brodie Rao <brodie@sf.io>
To: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH] archive: fix archive generation for empty trees
Date: Thu, 8 Mar 2012 16:08:31 -0800	[thread overview]
Message-ID: <CAJjwD-2BLYqNkb+uZqf448eFsqGEXUGuLHE3+YVi-njZGTQvuw@mail.gmail.com> (raw)
In-Reply-To: <4F58F063.4060600@lsrfire.ath.cx>

On Thu, Mar 8, 2012 at 9:46 AM, René Scharfe
<rene.scharfe@lsrfire.ath.cx> wrote:
> Am 08.03.2012 01:09, schrieb Brodie Rao:
>
>> diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
>> index 527c9e7..404786f 100755
>> --- a/t/t5000-tar-tree.sh
>> +++ b/t/t5000-tar-tree.sh
>> @@ -360,4 +360,20 @@ test_expect_success GZIP 'remote tar.gz can be
>> disabled' '
>>                >remote.tar.gz
>>  '
>>
>> +test_expect_success \
>> +    'git archive with an empty tree and a prefix' \
>> +    'git rm -r .&&
>> +     git commit -m empty&&
>> +     git archive --format=tar --prefix=empty/ HEAD>  e1.tar&&
>> +     "$TAR" tf e1.tar'
>> +
>> +test_expect_success \
>> +    'git archive with an empty tree and no prefix' \
>> +    'git archive --format=tar HEAD>  e2.tar&&
>> +     test_must_fail "$TAR" tf e2.tar'
>
>
> This test fails for me, i.e. tar does not complain about the empty archive
> (GNU tar 1.25).  Perhaps use git archive -v to generate a list of entries?

Whoops. I only ran the test with BSD tar, which apparently isn't
tolerant of the empty archive git-archive is generating. It'd probably
be better to omit the tar invocation in that test and just confirm
that git-archive doesn't blow up.

>
>
>> +
>> +test_expect_success \
>> +    'git archive on specific paths with an empty tree' \
>> +    'test_must_fail git archive --format=tar --prefix=empty/ HEAD foo'
>> +
>>  test_done
>> -- 1.7.9.2
>>
>

      reply	other threads:[~2012-03-09  0:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08  0:09 [PATCH] archive: fix archive generation for empty trees Brodie Rao
2012-03-08  5:55 ` Jeff King
2012-03-08  6:38   ` Junio C Hamano
2012-03-08  7:15     ` Jeff King
2012-03-08 17:46       ` René Scharfe
2012-03-09  0:06       ` Brodie Rao
2012-03-09  7:30         ` René Scharfe
2012-03-08 17:46 ` René Scharfe
2012-03-09  0:08   ` Brodie Rao [this message]

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=CAJjwD-2BLYqNkb+uZqf448eFsqGEXUGuLHE3+YVi-njZGTQvuw@mail.gmail.com \
    --to=brodie@sf.io \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=rene.scharfe@lsrfire.ath.cx \
    /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).