From 9d34717651df1d89b32257c5a74d7a16c955cbac Mon Sep 17 00:00:00 2001 From: Richard Hartmann Date: Thu, 23 Oct 2014 20:46:48 +0200 Subject: [PATCH 1/1] vcsh: Move list_untracked() into correct place --- vcsh | 60 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/vcsh b/vcsh index 54026cf..c2b6ff4 100755 --- 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 -- 2.39.5