git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix archive format with -- on the command line

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 10, 2009, 23:31 UTC
Message-ID
<7vd42m8kyr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vhbry8l54.fsf_-_@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Giving --format from the command line, or using output file extention to
> DWIM the output format, with a pathspec that is disambiguated with an
> explicit double-dash on the command line, e.g.
>
>     git archive -o file --format=zip HEAD -- path
>     git archive -o file.zip HEAD -- path
>
> didn't work correctly.
>
> This was because the code reordered (when one was given) or added (when
> the former was inferred) a --format argument at the end, effectively
> making it to "archive HEAD -- path --format=zip", i.e. an extra pathspec
> that is unlikely to match anything.
A side note to this issue is that
    $ git add non-existing-path
complains but
    $ git archive HEAD non-existing-path
doesn't.  Is this something we should consider a bug, or a feature?
Previous: Junio C HamanoNext: René Scharfe
Message 6 of 11 in “[BUG] git archive formats and dashdash”
  1. Ilari LiusvaaraDec 10, 2009
  2. Junio C HamanoDec 10, 2009
  3. Miklos VajnaDec 10, 2009
  4. Junio C HamanoDec 10, 2009
  5. Fix archive format with -- on the command lineJunio C Hamano, Dec 10, 2009
  6. Junio C HamanoDec 10, 2009
  7. René ScharfeDec 12, 2009
  8. Nanako ShiraishiDec 30, 2009
  9. Junio C HamanoDec 30, 2009
  10. Ilari LiusvaaraDec 10, 2009
  11. builtin-archive: insert --format before double dash if necessary.Miklos Vajna, Dec 10, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.