diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-10-07 12:41:00 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-27 15:46:05 +0200 |
commit | 81023f6318b0257fd266585b34817dee46c37e35 (patch) | |
tree | c39c065208bd56812b0c0e4a2db35e5d98e56c83 /db-functions | |
parent | 517e420a8a7a2222c3fba25a049cbed694d74ae9 (diff) | |
download | dbscripts-81023f6318b0257fd266585b34817dee46c37e35.tar.gz dbscripts-81023f6318b0257fd266585b34817dee46c37e35.tar.xz |
be more quiet unless errors occur
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'db-functions')
-rw-r--r-- | db-functions | 13 |
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() { |