index : asp32 | |
Archlinux32 fork of asp - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | package.inc.sh | 2 | ||||
-rw-r--r-- | remote.inc.sh | 2 | ||||
-rw-r--r-- | shell/bash-completion | 6 | ||||
-rw-r--r-- | util.inc.sh | 8 |
diff --git a/package.inc.sh b/package.inc.sh index b1d438b..22147de 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -167,7 +167,7 @@ package_checkout() { git show-ref -q "refs/heads/$remote/packages/$pkgname" || git branch -qf --no-track {,}"$remote/packages/$pkgname" - git clone "$ASPROOT" --single-branch --branch "$remote/packages/$pkgname" \ + quiet_git clone "$ASPROOT" --single-branch --branch "$remote/packages/$pkgname" \ "$startdir/$pkgname" || return 1 git --git-dir="$startdir/$pkgname/.git" config pull.rebase true diff --git a/remote.inc.sh b/remote.inc.sh index 8b9674b..db6d318 100644 --- a/remote.inc.sh +++ b/remote.inc.sh @@ -52,7 +52,7 @@ remote_get_tracked_refs() { remote_update_refs() { local remote=$1 refspecs=("${@:2}") - git fetch "$remote" "${refspecs[@]}" + quiet_git fetch "$remote" "${refspecs[@]}" } remote_update() { diff --git a/shell/bash-completion b/shell/bash-completion index 7233705..acff4c8 100644 --- a/shell/bash-completion +++ b/shell/bash-completion @@ -39,11 +39,11 @@ _asp() { word=${COMP_WORDS[i]} if in_array "$word" ${verbs[ALL_PACKAGES]}; then verb=$word - comps=$(\asp list-all | sed 's,.*/,,') + comps=$(ASP_GIT_QUIET=1 \asp list-all | sed 's,.*/,,') break elif in_array "$word" ${verbs[LOCAL_PACKAGES]}; then verb=$word - comps=$(\asp list-local | sed 's,.*/,,') + comps=$(ASP_GIT_QUIET=1 \asp list-local | sed 's,.*/,,') break elif in_array "$word" ${verbs[NONE]}; then verb=$word @@ -55,7 +55,7 @@ _asp() { case $verb in show) if (( i < ${#COMP_WORDS[@]} - 2 )); then - comps=$(\asp ls-files "${COMP_WORDS[i+1]}" 2>/dev/null) + comps=$(ASP_GIT_QUIET=1 \asp ls-files "${COMP_WORDS[i+1]}" 2>/dev/null) fi ;; '') diff --git a/util.inc.sh b/util.inc.sh index c33cb63..ddd7592 100644 --- a/util.inc.sh +++ b/util.inc.sh @@ -36,3 +36,11 @@ in_array() { return 1 } + +quiet_git() { + local q + + [[ $ASP_GIT_QUIET ]] && q=('-q') + + command git "$1" "${q[@]}" "${@:2}" +} |