Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.sh
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@smyrno.hos.anvin.org>2005-09-30 22:02:26 +0400
committerH. Peter Anvin <hpa@smyrno.hos.anvin.org>2005-09-30 22:02:26 +0400
commit039c6f162a63e9d91f360e2e6138e21a4015c543 (patch)
tree94d6d7bf46a4fc75a9044a605cd28d31f30b8674 /git.sh
parent9220282a9c6fae98d326bd10e4f427f1692b71ed (diff)
Better handling of exec extension in the git wrapper script
Diffstat (limited to 'git.sh')
-rwxr-xr-xgit.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/git.sh b/git.sh
index ea710aafc1..2986f08ce2 100755
--- a/git.sh
+++ b/git.sh
@@ -11,11 +11,17 @@ case "$#" in
echo "git version @@GIT_VERSION@@"
exit 0 ;;
esac
-
- test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
-
- # In case we're running on Cygwin...
- test -x $path/git-$cmd.exe && exec $path/git-$cmd.exe "$@" ;;
+
+ test -x $path/git-$cmd && exec $path/git-$cmd "$@"
+
+ case '@@X@@' in
+ '')
+ ;;
+ *)
+ test -x $path/git-$cmd@@X@@ && exec $path/git-$cmd@@X@@ "$@"
+ ;;
+ esac
+ ;;
esac
echo "Usage: git COMMAND [OPTIONS] [TARGET]"