From: Richard Hartmann Date: Wed, 10 Jul 2013 10:37:45 +0000 (+0200) Subject: Merge branch 'master' of github.com:RichiH/vcsh X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/04836991be4626c60964f77a935d425e41782c9f?ds=sidebyside;hp=-c Merge branch 'master' of github.com:RichiH/vcsh --- 04836991be4626c60964f77a935d425e41782c9f diff --combined vcsh index 2764d3d,159feda..e64ca0b --- a/vcsh +++ b/vcsh @@@ -101,6 -101,7 +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 +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 @@@ -332,16 -344,17 +344,17 @@@ elif [ "$1" = 'delete' ] | [ "$1" = 'write-gitignore' ]; then [ -z $2 ] && fatal "$1: please specify repository to work on" 1 [ "$1" = 'rename' -a -z "$3" ] && fatal "$1: please specify a target name" 1 - [ "$1" = 'run' -a -z "$3" ] && fatal "$1: please specify a command" 1 + [ "$1" = 'run' -a -z "$3" ] && fatal "$1: please specify a command" 1 export VCSH_COMMAND="$1" export VCSH_REPO_NAME="$2" export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git" - [ "$VCSH_COMMAND" = 'rename' ] && export GIT_DIR_NEW="$VCSH_REPO_D/$3.git" - [ "$VCSH_COMMAND" = 'run' ] && shift 2 + [ "$VCSH_COMMAND" = 'rename' ] && export GIT_DIR_NEW="$VCSH_REPO_D/$3.git" + [ "$VCSH_COMMAND" = 'run' ] && shift 2 [ "$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'