Re: [PATCH] test-lib: simplify '--option=value' parsing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 22, 2016, 20:54 UTC
- Message-ID
- <xmqq1t5xpdnk.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160422183703.GA7595@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> For some reason I had always assumed that complicated pattern matching > with "#" was non-POSIX, but I checked and it is definitely in there.
No, the offending code really dates back to the days back when I was writing most of the shell scripts (or others were mostly copying from what I have written). I had this irrational aversion against variable substitutions that are beyond ${var-default}, ${var=assign} and ${var+isset}.
The conversion looks fine (modulo one missed one you noticed).
Thanks for cleaning things up.