From c6d858a8c1f76c967023ce5792b4081f50ae98bc Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Fri, 10 Nov 2017 10:18:52 -0500 Subject: [PATCH] don't commit with no mods one improvement over classic, and necessary since we're always checking return values now. --- scripts/rev_control/version_control.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 2.34.1