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

vcsh: Factor out code from status() into status_helper()

parent cd22460d
Branches
Tags
No related merge requests found
...@@ -361,20 +361,21 @@ run() { ...@@ -361,20 +361,21 @@ run() {
status() { status() {
if [ -n "$VCSH_REPO_NAME" ]; then if [ -n "$VCSH_REPO_NAME" ]; then
GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR status_helper $VCSH_REPO_NAME
use
git status --short --untracked-files='no'
VCSH_COMMAND_RETURN_CODE=$?
else else
for VCSH_REPO_NAME in $(list); do for VCSH_REPO_NAME in $(list); do
echo "$VCSH_REPO_NAME:" echo "$VCSH_REPO_NAME:"
status_helper $VCSH_REPO_NAME
echo
done
fi
}
status_helper() {
GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR GIT_DIR=$VCSH_REPO_D/$VCSH_REPO_NAME.git; export GIT_DIR
use use
git status --short --untracked-files='no' git status --short --untracked-files='no'
VCSH_COMMAND_RETURN_CODE=$? VCSH_COMMAND_RETURN_CODE=$?
echo
done
fi
} }
upgrade() { upgrade() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment