Re: [PATCH] completion: fix incorrect bash/zsh string equality check
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 8, 2021, 20:50 UTC
- Message-ID
- <xmqqbl3zjl5y.fsf@gitster.g>
- In-Reply-To
- <pull.1096.git.git.1633642772432.gitgitgadget@gmail.com>
"Robert Estelle via GitGitGadget" <gitgitgadget@gmail.com> writes:
> This fixes an error in contrib/completion/git-completion.bash caused by > the incorrect use of == (vs. single =) inside a basic [/test command. > Double-equals == should only be used with the extended [[ comparison.
Curious.
Would it be equally a valid fix to use "=" instead of "==", or would that change the meaning? This is a bash-only piece of code, so use of [[ ... ]] is not technically incorrect, but if the basic [] works well enough with "=", we should prefer that.
Thanks.