Skip to content
Snippets Groups Projects
Commit 67b0da79 authored by Richard Hartmann's avatar Richard Hartmann
Browse files

Merge branch 'feature--vcsh-commit'

Conflicts:
	doc/vcsh.1.ronn
	vcsh
parents 25826512 a5523eb2
No related branches found
No related tags found
No related merge requests found
...@@ -86,6 +86,9 @@ an interactive user. ...@@ -86,6 +86,9 @@ an interactive user.
If you need to clone a bundle of repositories, look into the If you need to clone a bundle of repositories, look into the
`post-clone-retired` hook. `post-clone-retired` hook.
* commit:
Commit in all repositories
* delete: * delete:
Delete an existing repository. Delete an existing repository.
......
...@@ -92,6 +92,7 @@ help() { ...@@ -92,6 +92,7 @@ help() {
commands: commands:
clone <remote> \\ clone <remote> \\
[<repo>] Clone from an existing repository [<repo>] Clone from an existing repository
commit Commit in all repositories
delete <repo> Delete an existing repository delete <repo> Delete an existing repository
enter <repo> Enter repository; spawn new instance of \$SHELL enter <repo> Enter repository; spawn new instance of \$SHELL
help Display this help text help Display this help text
...@@ -158,6 +159,18 @@ clone() { ...@@ -158,6 +159,18 @@ clone() {
hook post-clone-retired 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() { delete() {
cd "$VCSH_BASE" || fatal "could not enter '$VCSH_BASE'" 11 cd "$VCSH_BASE" || fatal "could not enter '$VCSH_BASE'" 11
use use
...@@ -383,7 +396,8 @@ elif [ "$1" = 'delete' ] || ...@@ -383,7 +396,8 @@ elif [ "$1" = 'delete' ] ||
[ "$VCSH_COMMAND" = 'rename' ] && { export VCSH_REPO_NAME_NEW="$3"; [ "$VCSH_COMMAND" = 'rename' ] && { export VCSH_REPO_NAME_NEW="$3";
export GIT_DIR_NEW="$VCSH_REPO_D/$VCSH_REPO_NAME_NEW.git"; } export GIT_DIR_NEW="$VCSH_REPO_D/$VCSH_REPO_NAME_NEW.git"; }
[ "$VCSH_COMMAND" = 'run' ] && shift 2 [ "$VCSH_COMMAND" = 'run' ] && shift 2
elif [ "$1" = 'list' ] || elif [ "$1" = 'commit' ] ||
[ "$1" = 'list' ] ||
[ "$1" = 'list-tracked' ] || [ "$1" = 'list-tracked' ] ||
[ "$1" = 'pull' ] || [ "$1" = 'pull' ] ||
[ "$1" = 'push' ] || [ "$1" = 'push' ] ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment