diff --git a/sunrise-commit.in b/sunrise-commit.in
index 40b5efd..abb3612 100755
--- a/sunrise-commit.in
+++ b/sunrise-commit.in
@@ -59,10 +59,11 @@ find_repo() {
 	elif cvs status -l >/dev/null 2>&1; then
 		SC_VCS=cvs
 	else
-		local remotes
+		local remotes ret
 		remotes=$(git branch -r 2>/dev/null)
+		ret=${?}
 
-		if [ ${?} -ne 127 -a ${?} -ne 128 ]; then
+		if [ ${ret} -ne 127 ] && [ ${ret} -ne 128 ]; then
 			if echo "${remotes}" | grep git-svn >/dev/null 2>&1; then
 				SC_VCS=git-svn
 			else
@@ -407,7 +408,7 @@ main() {
 
 			# With DVCS repos, we do not do ChangeLogs by default...
 			# ...at least unless they're already there.
-			if [ ${SC_VCS#git-} = svn -o ${SC_VCS} = cvs -o -f ChangeLog ]; then
+			if [ ${SC_VCS#git-} = svn ] || [ ${SC_VCS} = cvs ] || [ -f ChangeLog ]; then
 				sayv 'Cleaning up the ChangeLog...'
 				vcs_reset ChangeLog
 
@@ -449,7 +450,7 @@ main() {
 				fi
 			fi
 
-			if [ ${SC_VCS} != cvs -o -n "${noupdate}" ]; then
+			if [ ${SC_VCS} != cvs ] || [ -n "${noupdate}" ]; then
 				vcs_status
 			fi
 			echo