]> 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:

vcsh: Move list_untracked() into correct place
authorRichard Hartmann <richih@debian.org>
Thu, 23 Oct 2014 18:46:48 +0000 (20:46 +0200)
committerRichard Hartmann <richih@debian.org>
Thu, 23 Oct 2014 18:46:48 +0000 (20:46 +0200)
vcsh

diff --git a/vcsh b/vcsh
index 54026cf0ac4f67383ec86e5ff831d70b3f0a5222..c2b6ff474644e75f9a2f3ab3d2435d18d9a065fa 100755 (executable)
--- a/vcsh
+++ b/vcsh
@@ -259,36 +259,6 @@ list_tracked_by() {
            sed 's/[,\&]/\\&/g')," | sort -u
 }
 
-pull() {
-       hook pre-pull
-       for VCSH_REPO_NAME in $(list); do
-               printf '%s: ' "$VCSH_REPO_NAME"
-               GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
-               use
-               git pull
-               VCSH_COMMAND_RETURN_CODE=$?
-               echo
-       done
-       hook post-pull
-}
-
-push() {
-       hook pre-push
-       for VCSH_REPO_NAME in $(list); do
-               printf '%s: ' "$VCSH_REPO_NAME"
-               GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
-               use
-               git push
-               VCSH_COMMAND_RETURN_CODE=$?
-               echo
-       done
-       hook post-push
-}
-
-retire() {
-       unset VCSH_DIRECTORY
-}
-
 list_untracked() {
        command -v 'comm' >/dev/null 2>&1 || fatal "Could not find 'comm'"
 
@@ -338,6 +308,36 @@ list_untracked_helper() {
        comm -12 --nocheck-order $temp_file_others $temp_file_untracked_copy > $temp_file_untracked
 }
 
+pull() {
+       hook pre-pull
+       for VCSH_REPO_NAME in $(list); do
+               printf '%s: ' "$VCSH_REPO_NAME"
+               GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
+               use
+               git pull
+               VCSH_COMMAND_RETURN_CODE=$?
+               echo
+       done
+       hook post-pull
+}
+
+push() {
+       hook pre-push
+       for VCSH_REPO_NAME in $(list); do
+               printf '%s: ' "$VCSH_REPO_NAME"
+               GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
+               use
+               git push
+               VCSH_COMMAND_RETURN_CODE=$?
+               echo
+       done
+       hook post-push
+}
+
+retire() {
+       unset VCSH_DIRECTORY
+}
+
 rename() {
        git_dir_exists
        [ -d "$GIT_DIR_NEW" ] && fatal "'$GIT_DIR_NEW' exists" 54