diff options
author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2007-03-30 06:49:53 -0500 |
---|---|---|
committer | Jeffrey C. Ollie <jeff@ocjtech.us> | 2007-03-30 06:49:53 -0500 |
commit | 766bd4e67df2668a3bf9b68d07c1e56d24e272e0 (patch) | |
tree | 0ed3103caf987c3b439abb5007efd30f8b5fef02 | |
parent | ba07ba9d291a11e101c6c195a6bf6a1a0e3880a6 (diff) | |
download | rancid-2.3.2a7-git-2.patch.tar.gz rancid-2.3.2a7-git-2.patch.tar.xz rancid-2.3.2a7-git-2.patch.zip |
only generate a diff if the commit was successfulrancid-2.3.2a7-git-2.patch
-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 3f74814..7defd9b 100644 --- a/bin/control_rancid.in +++ b/bin/control_rancid.in @@ -511,7 +511,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 |