summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions13
1 files changed, 9 insertions, 4 deletions
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() {