]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: bash: cleanup cygwin check
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Oct 2020 02:07:10 +0000 (20:07 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Oct 2020 21:30:59 +0000 (14:30 -0700)
Avoid Yoda conditions, and use $OSTYPE.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index ed059f35c375e8ecc192f7f150bc9b6a4b0bb59c..980ce73b0f233d21226d2238c53aa97ea42ab734 100644 (file)
@@ -3499,6 +3499,6 @@ __git_complete gitk __gitk_main
 # when the user has tab-completed the executable name and consequently
 # included the '.exe' suffix.
 #
-if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
-__git_complete git.exe __git_main
+if [ "$OSTYPE" = cygwin ]; then
+       __git_complete git.exe __git_main
 fi