rev-parse: fix potential bus error with --parseopt option spec handling
commite103343644188ddddb3678f0568d150ca56f59e3
authorJay Soffian <jaysoffian@gmail.com>
Tue, 26 Feb 2008 04:07:39 +0000 (25 23:07 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Feb 2008 05:40:12 +0000 (25 21:40 -0800)
tree90bd52d7f2b9cf74eb62b80da5acb0065fae4cd6
parent1468bd47833c6ec3c85620d6af1d910e9378f714
rev-parse: fix potential bus error with --parseopt option spec handling

A non-empty line containing no spaces should be treated by --parseopt as
an option group header, but was causing a bus error. Also added a test
script for rev-parse --parseopt.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-rev-parse.c
t/t1502-rev-parse-parseopt.sh [new file with mode: 0755]