summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2007-03-30 06:49:53 -0500
committerJeffrey C. Ollie <jeff@ocjtech.us>2008-02-13 14:50:29 -0600
commit12a21a80727da447c47c8dd924038a2ef6f23178 (patch)
tree7fa24d52a8262a60de4992e8e1a16e0b19406b6d
parenta8db9f5037de326d745b75873ecc8690fa8e5995 (diff)
downloadrancid-12a21a80727da447c47c8dd924038a2ef6f23178.zip
rancid-12a21a80727da447c47c8dd924038a2ef6f23178.tar.gz
rancid-12a21a80727da447c47c8dd924038a2ef6f23178.tar.xz
only generate a diff if the commit was successful
-rw-r--r--bin/control_rancid.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/control_rancid.in b/bin/control_rancid.in
index 57139d2..ffef024 100644
--- a/bin/control_rancid.in
+++ b/bin/control_rancid.in
@@ -531,7 +531,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