commit:     e186376f6a6f1e787523b60f6b93a28b999dc56e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  7 06:38:39 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jul  7 06:40:22 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/commit/?id=e186376f

commit-and-tag: only commit if there is something to commit

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 commit-and-tag | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/commit-and-tag b/commit-and-tag
index f9b1f38..0e2ba26 100755
--- a/commit-and-tag
+++ b/commit-and-tag
@@ -10,9 +10,11 @@ OUR_PATCHES_VERSION="${2}"
 TAG="${XEN_VERSION}-gentoo-patchset-${OUR_PATCHES_VERSION}"
 DESCRIPTION="Gentoo specific patches for Xen ${XEN_VERSION} (or later)"
 
-git commit \
-       --signoff \
-       -m "${DESCRIPTION}"
+if [[ -n $(git status --porcelain) ]]; then
+       git commit \
+               --signoff \
+               -m "${DESCRIPTION}"
+fi
 
 git tag \
        -s \

Reply via email to