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 30, 2009, 08:11 UTC
Message-ID
<7vhbr8519z.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091230121309.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Junio, could you tell us what happened to this thread?
>
> "git archive HEAD non-existing-path" doesn't complain like "git
> add" does, and the patch is to fix it.  No discussion.

It walks the tree twice, once for the checking and then another for doing its real work. Doing that way obviously looks stupid and inefficient but on the other hand it can fail before doing anything, which may be a big plus. I couldn't decide the pros-and-cons at the moment.

Probably it is worth queuing the patch as is, and if there are motivated people who want to, let them "optimize" it by rolling that check into the main loop.

I dunno.
Previous: Nanako ShiraishiNext: Ilari Liusvaara
Message 9 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.