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
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xgit.sh16
2 files changed, 13 insertions, 6 deletions
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]"