summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-10-28 02:07:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-28 21:30:59 (GMT)
commit8030684beb7af806909c3fa79d3d4017121a753c (patch)
tree03aa34c78814d33645e6848fe1ea69c271787fd1 /contrib/completion/git-completion.bash
parent5a364d2a18311de1791375731678ca13cde89f13 (diff)
downloadgit-8030684beb7af806909c3fa79d3d4017121a753c.zip
git-8030684beb7af806909c3fa79d3d4017121a753c.tar.gz
git-8030684beb7af806909c3fa79d3d4017121a753c.tar.bz2
completion: bash: cleanup cygwin check
Avoid Yoda conditions, and use $OSTYPE. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ed059f3..980ce73 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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