Subject: Re: [PATCH] grep: provide pathspecs/patterns via file or stdin

From: Junio C Hamano <[email-masked]>
Date: Fri, 22 Nov 2019 12:56:27 +0900

Junio C Hamano <[email-masked]> writes:

> Denton Liu <[email-masked]> writes:
>
>> The reason I ask is because (correct me if I'm wrong) a lot of other git
>> commands (like add, reset and checkout) don't seem to accept pathspecs
>> via stdin and could suffer the same problem. xargs seems like a more
>> general way of solving the problem of long command lines.
>
> There are things "xargs" is sufficient, and there are things that
> absolutely requires a single invocation of "git".  "grep" is a bit
> of both.

Sorry for not addressing your sample commands.

The "add", "reset", "checkout" subcommands are fine examples that
driving them with "xargs" is 100% sufficient and there is no need
for the pathspec-from-file thing; adding it to them would probably
not make the system any worse, but it is far far less important than
some other "git" subcommands for which "xargs" does not work as a
replacement.

Thanks.