diff options
author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2007-03-30 06:49:53 -0500 |
---|---|---|
committer | Jeffrey C. Ollie <jeff@ocjtech.us> | 2008-12-16 22:00:32 -0600 |
commit | 3ebfeb14c3b0fe8710348321cd15dfc7967dc64d (patch) | |
tree | b96f61b3e4d2f6de56a718c94f9b9bca3acf0326 | |
parent | d6ec07fb1c5183cd83b7223b090eb124bd9c1b5c (diff) | |
download | rancid-3ebfeb14c3b0fe8710348321cd15dfc7967dc64d.tar.gz rancid-3ebfeb14c3b0fe8710348321cd15dfc7967dc64d.tar.xz rancid-3ebfeb14c3b0fe8710348321cd15dfc7967dc64d.zip |
only generate a diff if the commit was successful
-rw-r--r-- | bin/control_rancid.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/control_rancid.in b/bin/control_rancid.in index c0f7bcd..4c9e069 100644 --- a/bin/control_rancid.in +++ b/bin/control_rancid.in @@ -541,7 +541,10 @@ case $RCSSYS in git add configs/$router done git commit -m "$message" - git diff --patch-with-stat HEAD^ HEAD -- . >$TMP.diff + if [ $? -eq 0 ]; then + # only generate a diff if the commit was successful + git diff --patch-with-stat HEAD^ HEAD -- . >$TMP.diff + fi ) 200>$BASEDIR/.lockfile ;; esac |