pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/etckeeper Be silent if there's nothing to com...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/43bc5ff5d0ea
branches:  trunk
changeset: 363829:43bc5ff5d0ea
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sat Jun 17 14:10:59 2017 +0000

description:
Be silent if there's nothing to commit. From Nathan Arthur in private mail.

diffstat:

 sysutils/etckeeper/distinfo                            |   4 +-
 sysutils/etckeeper/patches/patch-commit.d_50vcs-commit |  23 +++++++++++++++--
 2 files changed, 22 insertions(+), 5 deletions(-)

diffs (53 lines):

diff -r 2c6844e0ddec -r 43bc5ff5d0ea sysutils/etckeeper/distinfo
--- a/sysutils/etckeeper/distinfo       Sat Jun 17 14:00:37 2017 +0000
+++ b/sysutils/etckeeper/distinfo       Sat Jun 17 14:10:59 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2017/05/20 01:05:05 schmonz Exp $
+$NetBSD: distinfo,v 1.5 2017/06/17 14:10:59 schmonz Exp $
 
 SHA1 (etckeeper_1.18.5-1.diff.gz) = c43743cdfc6aa6543d95b7f19337d545d9cbe040
 RMD160 (etckeeper_1.18.5-1.diff.gz) = d7708dd7b2879e53ddd98896c7567d00da685286
@@ -9,7 +9,7 @@
 SHA512 (etckeeper_1.18.5.orig.tar.gz) = bfdd5ffb6ae72ebc5ea8254404280ea1c89de44cfb4c888bc40d1a8504887d198b967f46f1d3952a5a22b0f5969a8f3291e4fc1c37bbd488e4b25682d41364cd
 Size (etckeeper_1.18.5.orig.tar.gz) = 67166 bytes
 SHA1 (patch-bash__completion) = 95936127f98a76b4b7b66ddc170ba6c1e1e4c0d9
-SHA1 (patch-commit.d_50vcs-commit) = 2776cf73cc1211b4beaf14ce05aeb96ff422a19a
+SHA1 (patch-commit.d_50vcs-commit) = 86b150cb5e72aed9f8bb7886c699ea895e770f36
 SHA1 (patch-debian_cron.daily) = b702508cbb4dd42a3ae9f4a0b4be3a763edaf131
 SHA1 (patch-etckeeper) = 07a6b61b6c79096065953d22087c32ea5d776f2c
 SHA1 (patch-etckeeper.8) = 7e72a7889e0478463eb2b304d2cadb44cd97aa52
diff -r 2c6844e0ddec -r 43bc5ff5d0ea sysutils/etckeeper/patches/patch-commit.d_50vcs-commit
--- a/sysutils/etckeeper/patches/patch-commit.d_50vcs-commit    Sat Jun 17 14:00:37 2017 +0000
+++ b/sysutils/etckeeper/patches/patch-commit.d_50vcs-commit    Sat Jun 17 14:10:59 2017 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-commit.d_50vcs-commit,v 1.1 2017/05/20 01:05:05 schmonz Exp $
+$NetBSD: patch-commit.d_50vcs-commit,v 1.2 2017/06/17 14:10:59 schmonz Exp $
 
-Test more carefully for a possibly missing binary. From Nathan Arthur in
-private mail.
+Test more carefully for a possibly missing binary, and be silent if
+there's nothing to commit. From Nathan Arthur in private mail.
 
 --- commit.d/50vcs-commit.orig 2016-07-17 23:01:39.000000000 +0000
 +++ commit.d/50vcs-commit
@@ -20,3 +20,20 @@
  fi
  
  ORIG_USER=$USER
+@@ -85,10 +87,12 @@ if [ "$VCS" = git ] && [ -d .git ]; then
+                       export GIT_COMMITTER_EMAIL
+               fi
+       fi
+-      if [ -n "$logfile" ]; then
+-              git commit $GIT_COMMIT_OPTIONS -F "$logfile"
+-      else
+-              git commit $GIT_COMMIT_OPTIONS
++      if ! git diff --cached --quiet; then
++              if [ -n "$logfile" ]; then
++                      git commit $GIT_COMMIT_OPTIONS -F "$logfile"
++              else
++                      git commit $GIT_COMMIT_OPTIONS
++              fi
+       fi
+ elif [ "$VCS" = hg ] && [ -d .hg ]; then
+       if [ -n "$USER" ]; then



Home | Main Index | Thread Index | Old Index