From 81023f6318b0257fd266585b34817dee46c37e35 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 7 Oct 2014 12:41:00 +0200 Subject: be more quiet unless errors occur Signed-off-by: Florian Pritz --- db-functions | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'db-functions') diff --git a/db-functions b/db-functions index 1ef2901..ca3e8e8 100644 --- a/db-functions +++ b/db-functions @@ -581,15 +581,20 @@ arch_history_remove() { } arch_history_commit() { - pushd "$HISTORYREPO" + pushd "$HISTORYREPO" >/dev/null + did_work=0 if ((${#HISTORY_add_files[@]} > 0)); then git add -- "${HISTORY_add_files[@]}" + did_work=1 fi if ((${#HISTORY_remove_files[@]} > 0)); then - git rm -- "${HISTORY_remove_files[@]}" + git rm -q -- "${HISTORY_remove_files[@]}" + did_work=1 fi - git commit -q -m "$1" - popd + if ((did_work)); then + git commit -q -m "$1" + fi + popd >/dev/null } pkgentry_from_db() { -- cgit v1.2.3-24-g4f1b