check_syntax/check_style: initialize $GIT_PREVIOUS_COMMIT if not present

Signed-off-by: Dave Simons <dave@inuits.eu>