mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
pgit.sh: push doesn't understand --login
--login is not understood by pgit.sh push. Solve that by allowing all commands a --login option. This addresses our use case, but isn't ideal of course. Will be finally fixed by moving pgit.sh's functionality into Python code. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0d95ccc5a0
commit
e31e50036d
1 changed files with 17 additions and 9 deletions
|
|
@ -115,7 +115,7 @@ clone()
|
|||
local refspec=()
|
||||
long_opts="$long_opts,refspec:"
|
||||
local login="$whoami"
|
||||
long_opts="$long_opts,login:"
|
||||
[ "$cmd_login" ] && login="$cmd_login"
|
||||
|
||||
local opts
|
||||
opts=$(getopt -o C --long "$long_opts" -n clone -- "$@") || fatal "Failed to parse options $@"
|
||||
|
|
@ -129,10 +129,6 @@ clone()
|
|||
refspec=(${2//:/ })
|
||||
shift
|
||||
;;
|
||||
--login)
|
||||
login="$2"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
fatal "Unknown option $1"
|
||||
;;
|
||||
|
|
@ -223,13 +219,13 @@ diff()
|
|||
|
||||
echo "running $0 $@ GIT_SSH=$GIT_SSH" >&2
|
||||
|
||||
cur=0
|
||||
SSH=ssh
|
||||
[ "$GIT_SSH" ] && SSH=$GIT_SSH
|
||||
|
||||
global_remote_base="ssh://git.janware.com/srv/git"
|
||||
|
||||
while [ ${1:0:1} = - ]; do
|
||||
case $1 in
|
||||
while [ "${1:0:1}" = - ]; do
|
||||
case "$1" in
|
||||
'--remote-base')
|
||||
global_remote_base="$2"
|
||||
shift
|
||||
|
|
@ -246,8 +242,20 @@ else
|
|||
fi
|
||||
|
||||
cmd=$1
|
||||
cur=0
|
||||
shift
|
||||
|
||||
while [ "${1:0:1}" = - ]; do
|
||||
case $1 in
|
||||
'--login')
|
||||
cmd_login="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case $cmd in
|
||||
clone|diff|commit)
|
||||
$cmd "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue