From cc23ff0d94f9fa2c01d9983656f7ee1d554da57f Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Fri, 30 Mar 2007 06:49:53 -0500 Subject: only generate a diff if the commit was successful --- bin/control_rancid.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/control_rancid.in b/bin/control_rancid.in index b0d5787..e75c773 100644 --- a/bin/control_rancid.in +++ b/bin/control_rancid.in @@ -533,7 +533,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 -- cgit