X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git.sh;h=7400c162578c5e18a2a406b09263394e485e0990;hb=d1c5f2a42d7b5c0e3d3862212dea1f09809c4963;hp=f9676507916184d567ed76d9e69a9ce2d8b00798;hpb=215a7ad1ef790467a4cd3f0dcffbd6e5f04c38f7;p=git.git diff --git a/git.sh b/git.sh index f9676507..7400c162 100755 --- a/git.sh +++ b/git.sh @@ -6,22 +6,70 @@ case "$#" in 0) ;; *) cmd="$1" shift - test -x $path/git-$cmd && exec $path/git-$cmd "$@" ;; + 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 "$@" + + case '@@X@@' in + '') + ;; + *) + test -x $path/git-$cmd@@X@@ && exec $path/git-$cmd@@X@@ "$@" + ;; + esac + ;; esac echo "Usage: git COMMAND [OPTIONS] [TARGET]" if [ -n "$cmd" ]; then - echo " git command '$cmd' not found: commands are:" -else - echo " git commands are:" + echo "git command '$cmd' not found." fi +echo "git commands are:" -cat <<\EOF - add apply archimport bisect branch checkout cherry clone - commit count-objects cvsimport diff fetch format-patch - fsck-cache get-tar-commit-id init-db log ls-remote octopus - pack-objects parse-remote patch-id prune pull push rebase - relink rename repack request-pull reset resolve revert - send-email shortlog show-branch status tag verify-tag - whatchanged +fmt <<\EOF | sed -e 's/^/ /' +add +apply +archimport +bisect +branch +checkout +cherry +clone +commit +count-objects +cvsimport +diff +fetch +format-patch +fsck-objects +get-tar-commit-id +init-db +log +ls-remote +octopus +pack-objects +parse-remote +patch-id +prune +pull +push +rebase +relink +rename +repack +request-pull +reset +resolve +revert +send-email +shortlog +show-branch +status +tag +verify-tag +whatchanged EOF