threads / discuss / 9881

git-archive not working correctly ?

Subject: git-archive not working correctly ?

## tl;dr

3 messages between Sep 16, 2007 and Sep 17, 2007.

replies: 2people: 3as markdown or json

Niki Guldbrand· Sep 16, 2007, 22:50 UTC · lore
Hi.

I have been playing with git-archive for and hour or so, but can't get it to pass "extra" options to tar as it's documented that it should, or am i reading the docs wrong ?

git-archive --format=<fmt> [--list] [--prefix=<prefix>/] [<extra>] [--remote=<repo>] <tree-ish> [path…]

<extra>
        This can be any options that the archiver backend understand.
        See next section.
        
I want to git tar the "--exclude=option", but i can't get it through.
Is this option only valid for the zip format with the options "-0" and
"-9" ?
Kind regards
Niki Guldbrand
Frank Lichtenheld· Sep 17, 2007, 00:31 UTC · re: Niki Guldbrand · lore

Re: git-archive not working correctly ?

On Mon, Sep 17, 2007 at 12:50:26AM +0200, Niki Guldbrand wrote:
Show 14 quoted lines
> I have been playing with git-archive for and hour or so, but can't get
> it to pass "extra" options to tar as it's documented that it should, or
> am i reading the docs wrong ?
> 
> git-archive --format=<fmt> [--list] [--prefix=<prefix>/] [<extra>]
> [--remote=<repo>] <tree-ish> [path…]
> 
> <extra>
>         This can be any options that the archiver backend understand.
>         See next section.
>         
> I want to git tar the "--exclude=option", but i can't get it through.
> Is this option only valid for the zip format with the options "-0" and
> "-9" ?
Yes. The tar backend currently doesn't support any extra options.
Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
Junio C Hamano· Sep 17, 2007, 00:35 UTC · re: Niki Guldbrand · lore

Re: git-archive not working correctly ?

Niki Guldbrand <niki.guldbrand@gmail.com> writes:
Show 10 quoted lines
> git-archive --format=<fmt> [--list] [--prefix=<prefix>/] [<extra>]
> [--remote=<repo>] <tree-ish> [path...]
>
> <extra>
>         This can be any options that the archiver backend understand.
>         See next section.
>         
> I want to git tar the "--exclude=option", but i can't get it through.
> Is this option only valid for the zip format with the options "-0" and
> "-9" ?

The "next section" that sentence refers to is "BACKEND EXTRA OPTIONS" section, which lists -0 and -9 for zip backend. There is no --exclude=option in either tar or zip backend.

Note that we do not use GNU tar or zip as archiver backends.

← back to recent threads