Re: [PATCH v3 1/3] t: add lib-crlf-messages.sh for messages containing CRLF
- From
Philippe Blain <levraiphilippeblain@gmail.com>
- Date
- Oct 22, 2020, 03:09 UTC
- Message-ID
- <7E00B1E7-DC57-4708-9D81-4402AD931126@gmail.com>
- In-Reply-To
- <20201012224706.GA4318@flurp.local>
Hi Eric,
Show 11 quoted lines
>> +cleanup_crlf_refs () {
>> + for branch in ${LIB_CRLF_BRANCHES}; do
>
> Our style is to place 'do' on its own line:
>
> for branch in $LIB_CRLF_BRANCHES
> do
> ...
>
> This would be a syntax error if LIB_CRLF_BRANCHES is empty for some
> reason, but I suppose we don't really have to worry about it here(?).Apparently, not in my shell, as I realized I had misspelled LIB_CRLF_BRANCHES as LIB_CLRF_BRANCHES (CLRF instead of CRLF) at another place and the test was passing correctly (the loop was not being entered at all though):
$ /bin/sh --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15) $ for a in $b; do echo hello; done; echo $? 0
I've fixed that in v4 which I just sent.
Cheers, Philippe.