X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-ls-remote.sh;h=2c9a588d21e4eaf6358148949ace2dc825798c55;hb=567ffeb7722eefab3991cb894c96548b92b57cc2;hp=f0f0b07f6f8c85219104303d65dabbba80fd3098;hpb=72e5890b68e7199d92620d3bba91fa36dd259404;p=git.git diff --git a/git-ls-remote.sh b/git-ls-remote.sh index f0f0b07f..2c9a588d 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -1,12 +1,18 @@ #!/bin/sh # -. git-sh-setup usage () { - echo >&2 "usage: $0 [--heads] [--tags] ..." + echo >&2 "usage: $0 [--heads] [--tags] [-u|--upload-pack ]" + echo >&2 " ..." exit 1; } +die () { + echo >&2 "$*" + exit 1 +} + +exec= while case "$#" in 0) break;; esac do case "$1" in @@ -14,6 +20,11 @@ do heads=heads; shift ;; -t|--t|--ta|--tag|--tags) tags=tags; shift ;; + -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\ + --upload-pac|--upload-pack) + shift + exec="--exec=$1" + shift;; --) shift; break ;; -*) @@ -62,7 +73,7 @@ rsync://* ) ;; * ) - git-peek-remote "$peek_repo" || + git-peek-remote $exec "$peek_repo" || echo "failed slurping" ;; esac |