From: Junio C Hamano Date: Thu, 10 Dec 2009 23:31:40 GMT Subject: Re: [PATCH] Fix archive format with -- on the command line Message-ID: <7vd42m8kyr.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vhbry8l54.fsf_-_@alter.siamese.dyndns.org> Junio C Hamano writes: > 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?