]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/rev-parse.c
parseopt: wrap rev-parse --parseopt usage for eval consumption
authorThomas Rast <trast@student.ethz.ch>
Sat, 12 Jun 2010 12:57:39 +0000 (14:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jun 2010 16:38:14 +0000 (09:38 -0700)
commit47e9cd28f8a404a0d6293935252ddca5fc243931
tree8a3c80aa6b82fdec17271ec3abaeb16798a66fb3
parent9c7304e3e39ed397b3cc6566573333e2698a52b4
parseopt: wrap rev-parse --parseopt usage for eval consumption

9c7304e (print the usage string on stdout instead of stderr,
2010-05-17) broke rev-parse --parseopt: when run with -h, the usage
notice on stdout ended up in the shell eval.

Wrap the usage in a cat <<\EOF ... EOF block when printing to stdout.
I do not expect any usage lines to ever start with EOF so this
shouldn't be an undue burden.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rev-parse.c
parse-options.c
parse-options.h
t/t1502-rev-parse-parseopt.sh