From 296fdc53bdd75147121aa290b4de0eeb3b4e7074 Mon Sep 17 00:00:00 2001 From: Peter Anvin Date: Wed, 28 Sep 2005 16:53:56 -0700 Subject: --- git.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'git.sh') diff --git a/git.sh b/git.sh index 178d0f0c09..b67a1647e2 100755 --- a/git.sh +++ b/git.sh @@ -12,6 +12,7 @@ case "$#" in exit 0 ;; esac test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;; + test -x $path/git-$cmd.exe && exec $path/git-$cmd.exe "$@" ;; esac echo "Usage: git COMMAND [OPTIONS] [TARGET]" -- cgit v1.3 From 918e723204651252e5a823481cc8450e498a45f9 Mon Sep 17 00:00:00 2001 From: Peter Anvin Date: Wed, 28 Sep 2005 16:56:08 -0700 Subject: For the benefit of Cygwin, test for git-cmd.exe --- git.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git.sh') diff --git a/git.sh b/git.sh index b67a1647e2..ea710aafc1 100755 --- a/git.sh +++ b/git.sh @@ -11,7 +11,10 @@ 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 "$@" ;; esac -- cgit v1.3 From 039c6f162a63e9d91f360e2e6138e21a4015c543 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 30 Sep 2005 11:02:26 -0700 Subject: Better handling of exec extension in the git wrapper script --- Makefile | 3 ++- git.sh | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'git.sh') diff --git a/Makefile b/Makefile index e5b8a51afe..38330c2e90 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,8 @@ all: git: git.sh Makefile rm -f $@+ $@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \ - -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' <$@.sh >$@+ + -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + -e 's/@@X@@/$(X)/g' <$@.sh >$@+ chmod +x $@+ mv $@+ $@ 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]" -- cgit v1.3