mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
pgit.sh: Log more git commands
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0d4cc05271
commit
f9c20f6a64
1 changed files with 17 additions and 17 deletions
|
|
@ -76,33 +76,33 @@ clone()
|
|||
marker "pulling $p from user $fromuser"
|
||||
if [ "$fromuser" = "$login" ]; then
|
||||
if [ -d $p ]; then
|
||||
git -C $p pull
|
||||
run_git -C $p pull
|
||||
else
|
||||
git clone ssh://$login@git.jannet.de/srv/git/$fromuser/proj/$p
|
||||
git -C $p submodule init || fatal git submodule init failed in `pwd`
|
||||
git -C $p submodule update || fatal git submodule update failed in `pwd`
|
||||
run_git clone ssh://$login@git.jannet.de/srv/git/$fromuser/proj/$p
|
||||
run_git -C $p submodule init || fatal git submodule init failed in `pwd`
|
||||
run_git -C $p submodule update || fatal git submodule update failed in `pwd`
|
||||
fi
|
||||
else
|
||||
local remotename="user-$fromuser"
|
||||
if [ -d $p ]; then
|
||||
git -C $p remote | grep -q "^$remotename$" || {
|
||||
git -C $p remote add $remotename $pullurl
|
||||
git -C $p remote set-url --push $remotename no_push
|
||||
run_git -C $p remote | grep -q "^$remotename$" || {
|
||||
run_git -C $p remote add $remotename $pullurl
|
||||
run_git -C $p remote set-url --push $remotename no_push
|
||||
}
|
||||
git -C $p pull $remotename master
|
||||
run_git -C $p pull $remotename master
|
||||
else
|
||||
set -x
|
||||
git clone ssh://$login@git.jannet.de/srv/git/$fromuser/proj/$p
|
||||
git -C $p remote rename origin $remotename || fatal failed to rename remote in `pwd`
|
||||
git -C $p remote set-url --push $remotename no_push
|
||||
run_git clone ssh://$login@git.jannet.de/srv/git/$fromuser/proj/$p
|
||||
run_git -C $p remote rename origin $remotename || fatal failed to rename remote in `pwd`
|
||||
run_git -C $p remote set-url --push $remotename no_push
|
||||
$git_srv_admin -u $login -j create-personal-project $p
|
||||
git -C $p remote add origin $pushurl
|
||||
git -C $p push origin master
|
||||
git -C $p branch --set-upstream-to origin/master master
|
||||
run_git -C $p remote add origin $pushurl
|
||||
run_git -C $p push origin master
|
||||
run_git -C $p branch --set-upstream-to origin/master master
|
||||
set +x
|
||||
fi
|
||||
git -C $p submodule init || fatal git submodule init failed in `pwd`
|
||||
git -C $p submodule update || fatal git submodule update failed in `pwd`
|
||||
run_git -C $p submodule init || fatal git submodule init failed in `pwd`
|
||||
run_git -C $p submodule update || fatal git submodule update failed in `pwd`
|
||||
fi
|
||||
done
|
||||
)}
|
||||
|
|
@ -114,7 +114,7 @@ diff()
|
|||
cd $pdir
|
||||
for d in $pdirs; do
|
||||
marker $d
|
||||
git -C $d diff --src-prefix=a/$d/ --dst-prefix=b/$d/ "$@"
|
||||
run_git -C $d diff --src-prefix=a/$d/ --dst-prefix=b/$d/ "$@"
|
||||
done
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue