[ -d "$repo/.git" ] || continue
cd "$repo" || continue
- name="$(basename $repo)"
+ name=$(git_name) || continue
+ [ -z "$name" ] && continue
+ #name="$(basename $repo)"
#
# Get user
#
# Pull
#
- echo ">git pull $repo (user=$user)"
+ echo ">Pull $name branch=$(git_branch) user=$user path=$repo"
cmd="${cmd}GIT_SSH=$GIT_SSH cd \"$repo\" && git pull"
[ "$CLEANUP" = "1" ] && cmd="$cmd && git gc"
_git_conn_check=""
git_conn_check() {
#local dest=$(git config --local --get remote.origin.url | sed -e 's/:.*$//' -e 's/^.*@//')
+ if [ "$1" = "-reset" ]; then
+ _git_conn_check=""
+ return
+ fi
+
local dest=$(git config --local --get remote.origin.url)
local port=''
git_branch_create_push() {
git checkout -b "$1" && git push --set-upstream origin "$1"
}
+
+git_name() {
+ git config --local remote.origin.url|sed 's,^.*[:/]\([^:/\.]\+\)\(\.git\)\?$,\1,'
+}
+
+git_branch() {
+ git branch | awk '/^\*/{print $2}'
+}