From 12a21a80727da447c47c8dd924038a2ef6f23178 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 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 -- cgit