From: Richard Hartmann Date: Wed, 31 Jul 2013 22:19:02 +0000 (+0200) Subject: Merge branch 'feature--vcsh-commit' X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/67b0da790e240f714bdd1c4256957c3261d5533a?hp=2582651209ea5ec44bba5a6435eb7b76296648c7 Merge branch 'feature--vcsh-commit' Conflicts: doc/vcsh.1.ronn vcsh --- diff --git a/doc/vcsh.1.ronn b/doc/vcsh.1.ronn index 9532e65..01cadb5 100644 --- a/doc/vcsh.1.ronn +++ b/doc/vcsh.1.ronn @@ -86,6 +86,9 @@ an interactive user. If you need to clone a bundle of repositories, look into the `post-clone-retired` hook. +* commit: + Commit in all repositories + * delete: Delete an existing repository. diff --git a/vcsh b/vcsh index f2bbd7a..85e20d8 100755 --- a/vcsh +++ b/vcsh @@ -92,6 +92,7 @@ help() { commands: clone \\ [] Clone from an existing repository + commit Commit in all repositories delete Delete an existing repository enter Enter repository; spawn new instance of \$SHELL help Display this help text @@ -158,6 +159,18 @@ clone() { hook post-clone-retired } +commit() { + hook pre-commit + for VCSH_REPO_NAME in $(list); do + echo "$VCSH_REPO_NAME: " + export GIT_DIR="$VCSH_REPO_D/$VCSH_REPO_NAME.git" + use + git commit --untracked-files=no --quiet + echo + done + hook post-commit +} + delete() { cd "$VCSH_BASE" || fatal "could not enter '$VCSH_BASE'" 11 use @@ -383,7 +396,8 @@ elif [ "$1" = 'delete' ] || [ "$VCSH_COMMAND" = 'rename' ] && { export VCSH_REPO_NAME_NEW="$3"; export GIT_DIR_NEW="$VCSH_REPO_D/$VCSH_REPO_NAME_NEW.git"; } [ "$VCSH_COMMAND" = 'run' ] && shift 2 -elif [ "$1" = 'list' ] || +elif [ "$1" = 'commit' ] || + [ "$1" = 'list' ] || [ "$1" = 'list-tracked' ] || [ "$1" = 'pull' ] || [ "$1" = 'push' ] ||