From: Richard Hartmann Date: Thu, 23 Oct 2014 18:46:48 +0000 (+0200) Subject: vcsh: Move list_untracked() into correct place X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/9d34717651df1d89b32257c5a74d7a16c955cbac?hp=--cc vcsh: Move list_untracked() into correct place --- 9d34717651df1d89b32257c5a74d7a16c955cbac 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