Thread (1 message) 1 message, 1 author, 2019-11-22

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

From: Junio C Hamano <hidden>
Date: 2019-11-22 03:56:36

Junio C Hamano [off-list ref] writes:
Denton Liu [off-list ref] writes:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help