X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/8f4a012b3bc70e1d33bdba17e5c319c00c829c2a..1d8970fdb8d4adbfd5cdecc5d15da9db61efb39d:/vcsh diff --git a/vcsh b/vcsh index e6b9377..159feda 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'