Git.pm: add new temp_is_locked function