Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:53

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help