Check for a null value when getting the current commit sha
Chinese Simplified Translation from @weihan1102