Junio C Hamano <gitster@xxxxxxxxx> writes: > Denton Liu <liu.denton@xxxxxxxxx> 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.