From e186376f6a6f1e787523b60f6b93a28b999dc56e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 7 Jul 2022 08:38:39 +0200 Subject: commit-and-tag: only commit if there is something to commit Signed-off-by: Florian Schmaus --- 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 \ -- cgit v1.2.3-65-gdbad