X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/a38e2f1749a80b9571d53a2328275b4741fe38e2..04836991be4626c60964f77a935d425e41782c9f:/vcsh?ds=inline diff --git a/vcsh b/vcsh index 2764d3d..e64ca0b 100755 --- a/vcsh +++ b/vcsh @@ -101,6 +101,7 @@ help() { list-tracked-by \\ List files tracked by a repository pull Pull from all vcsh remotes + push Push to vcsh remotes rename \\ Rename repository run \\ @@ -234,6 +235,17 @@ pull() { hook post-pull } +push() { + hook pre-push + for VCSH_REPO_NAME in $(list); do + echo -n "$VCSH_REPO_NAME: " + export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git" + use + git push + done + hook post-push +} + rename() { git_dir_exists [ -d "$GIT_DIR_NEW" ] && fatal "'$GIT_DIR_NEW' exists" 54 @@ -341,7 +353,8 @@ elif [ "$1" = 'delete' ] || [ "$VCSH_COMMAND" = 'write-gitignore' ] elif [ "$1" = 'list' ] || [ "$1" = 'list-tracked' ] || - [ "$1" = 'pull' ]; then + [ "$1" = 'pull' ] || + [ "$1" = 'push' ]; then export VCSH_COMMAND="$1" elif [ -n "$2" ]; then export VCSH_COMMAND='run'