From: Chris Koeritz Date: Thu, 9 Nov 2017 16:26:25 +0000 (-0500) Subject: tastier X-Git-Tag: 2.140.90~26 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=232702be7b9f3ffa3fb162757af86810d3ddb65b;p=feisty_meow.git tastier still debugging, but also added a check on whether the local repo is clean or not. if it's clean, we don't try to commit, since that alone throws an error. --- diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 777e51b4..b959d907 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -155,12 +155,22 @@ function do_checkin() git add --all . retval=$? echo A: retval=$retval - # tell git about all the files and get a check-in comment. - git commit . + + # see if there are any changes in the local repository. + if ! git diff-index --quiet HEAD --; then + # tell git about all the files and get a check-in comment. + git commit . + retval+=$? +echo B.1: retval=$retval + fi + # catch if the diff-index failed somehow. retval+=$? -echo B: retval=$retval - # upload the files to the server so others can see them. - git push 2>&1 | grep -v "X11 forwarding request failed" +echo B.2: retval=$retval + + # upload any changes to the upstream repo so others can see them. + git push 2>&1 +#| grep -v "X11 forwarding request failed" +#have to do pipestatus if want to keep the above. retval+=$? echo C: retval=$retval fi