Revision 782a0005fcb26bb7ef27f720fd139ae40a6f434b authored by Junio C Hamano on 10 December 2009, 23:27:51 UTC, committed by Junio C Hamano on 10 December 2009, 23:29:05 UTC
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 format 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.

The command line argument list should always be "options, revs and then
paths", and we should set a good example by inserting the --format at the
beginning instead.

Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 1456b04
History
File Mode Size
xdiff.h -rw-r--r-- 3.1 KB
xdiffi.c -rw-r--r-- 14.6 KB
xdiffi.h -rw-r--r-- 1.8 KB
xemit.c -rw-r--r-- 5.1 KB
xemit.h -rw-r--r-- 1.2 KB
xinclude.h -rw-r--r-- 1.2 KB
xmacros.h -rw-r--r-- 1.9 KB
xmerge.c -rw-r--r-- 14.3 KB
xpatience.c -rw-r--r-- 10.7 KB
xprepare.c -rw-r--r-- 11.2 KB
xprepare.h -rw-r--r-- 1.1 KB
xtypes.h -rw-r--r-- 1.6 KB
xutils.c -rw-r--r-- 8.1 KB
xutils.h -rw-r--r-- 1.7 KB

back to top