From: Fred T. Hamster Date: Fri, 10 Nov 2017 15:18:52 +0000 (-0500) Subject: don't commit with no mods X-Git-Tag: 2.140.91~6 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=c6d858a8c1f76c967023ce5792b4081f50ae98bc don't commit with no mods one improvement over classic, and necessary since we're always checking return values now. --- diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 6321dc14..0a6ee8fe 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -84,9 +84,13 @@ function do_checkin() # snag all new files. not to everyone's liking. git add --all . test_or_die "git add all new files" - # tell git about all the files and get a check-in comment. - git commit . - test_or_die "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 . + test_or_die "git commit" + fi # upload the files to the server so others can see them. git push 2>&1 | grep -v "X11 forwarding request failed" if [ ${PIPESTATUS[0]} -ne 0 ]; then false; fi