We should pass in `nil` if the matched pathspec is empty.

Also, can you move this ternary onto its own line? It's pretty dense where it is right now.