Refactor `run_git` spec helper to use `Process.capture_result?` (#17079)