use different method to set default value for GIT_PREVIOUS_COMMIT

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