git --version tells which version of git you have.
[git/git.git] / git.sh.in
similarity index 84%
rename from git.sh
rename to git.sh.in
index f967650..178d0f0 100755 (executable)
--- a/git.sh
+++ b/git.sh.in
@@ -6,6 +6,11 @@ case "$#" in
 0)     ;;
 *)     cmd="$1"
        shift
+       case "$cmd" in
+       -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+               echo "git version @@GIT_VERSION@@"
+               exit 0 ;;
+       esac
        test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;;
 esac