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.