]> git.madduck.net Git - code/vcsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge branch 'feature--vcsh-commit'
authorRichard Hartmann <richih.mailinglist@gmail.com>
Wed, 31 Jul 2013 22:19:02 +0000 (00:19 +0200)
committerRichard Hartmann <richih.mailinglist@gmail.com>
Wed, 31 Jul 2013 22:19:02 +0000 (00:19 +0200)
Conflicts:
doc/vcsh.1.ronn
vcsh

1  2 
doc/vcsh.1.ronn
vcsh

diff --cc doc/vcsh.1.ronn
index 9532e654278c1187eb0112b8d50769ed19156eea,b7f9725a9b454cf8cc6c023d595cd3ad9e5cb079..01cadb5942b9debfeb1135ea0e81ba257e1edb1e
@@@ -83,9 -81,9 +83,12 @@@ an interactive user
  * clone:
    Clone an existing repository.
  
 +  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 --cc vcsh
index f2bbd7a229c8211b9d79cb3bb0ee262f54a28eec,1918af44d8cb8f2dafc5c33aae26cb5b007699e6..85e20d8e6bc3ce41a0f451192a85f8c6e1fba28a
--- 1/vcsh
--- 2/vcsh
+++ b/vcsh
@@@ -154,10 -154,20 +155,22 @@@ clone() 
    Once this situation has been resolved, run 'vcsh run $VCSH_REPO_NAME git pull' to finish cloning.\n" 17
        git merge origin/master
        hook post-clone
 +      retire
 +      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
@@@ -380,14 -361,14 +393,15 @@@ elif [ "$1" = 'delete' ]           |
        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" = 'write-gitignore' ]
 +      [ "$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' ]; then
 +     [ "$1" = 'push' ] ||
 +     [ "$1" = 'status' ]; then
        export VCSH_COMMAND="$1"
  elif [ -n "$2" ]; then
        export VCSH_COMMAND='run'