Loading .shell/funcs +0 −43 Original line number Diff line number Diff line Loading @@ -102,48 +102,6 @@ update_worktree() fi } update_repos() ( git fetch origin local worktree=`mktemp -d` git worktree add -f $worktree --detach origin/master cd $worktree git submodule sync --recursive git submodule update --init --recursive --depth=1 ${GIT_JOBS} git submodule foreach --recursive ' setting="submodule.${name}.auto-update"; branch=`git config -f ~/.gitmodules ${setting}`; git checkout origin/${branch:-master} || exit 1 (cd ${toplevel}; exec git add ${path}) ' local updates="`git status --short -uno`" if [ -n "$updates" ]; then git commit -F- <<-END_MESSAGE Update submodules $updates Automatically generated: source: .shell/funcs:update_submodules() time: `date` host: `hostname -f 2>/dev/null || hostname` END_MESSAGE if git push origin HEAD:master; then echo >&2 "Submodules have been updated and pushed to origin" else echo >&2 "Automatic push failed, this may mean the remote" \ "'origin' has not been set" fi fi cd && rm -r $worktree ) do_update() { local timestamp=${HOME}/.shell/.update Loading Loading @@ -171,7 +129,6 @@ do_update() (cd ~ set -eu git_check && update_repos && update_worktree ) || return Loading Loading
.shell/funcs +0 −43 Original line number Diff line number Diff line Loading @@ -102,48 +102,6 @@ update_worktree() fi } update_repos() ( git fetch origin local worktree=`mktemp -d` git worktree add -f $worktree --detach origin/master cd $worktree git submodule sync --recursive git submodule update --init --recursive --depth=1 ${GIT_JOBS} git submodule foreach --recursive ' setting="submodule.${name}.auto-update"; branch=`git config -f ~/.gitmodules ${setting}`; git checkout origin/${branch:-master} || exit 1 (cd ${toplevel}; exec git add ${path}) ' local updates="`git status --short -uno`" if [ -n "$updates" ]; then git commit -F- <<-END_MESSAGE Update submodules $updates Automatically generated: source: .shell/funcs:update_submodules() time: `date` host: `hostname -f 2>/dev/null || hostname` END_MESSAGE if git push origin HEAD:master; then echo >&2 "Submodules have been updated and pushed to origin" else echo >&2 "Automatic push failed, this may mean the remote" \ "'origin' has not been set" fi fi cd && rm -r $worktree ) do_update() { local timestamp=${HOME}/.shell/.update Loading Loading @@ -171,7 +129,6 @@ do_update() (cd ~ set -eu git_check && update_repos && update_worktree ) || return Loading