Truncate commit hash