Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: git-grep documentation

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:17

Possibly related (same subject, not in this thread)

sean [off-list ref] writes:
So your new patch should also fix that comment to remove the 
"(or flags)" portion.
Probably.
Since you comment on the -- marker here I think it should
also appear in the command line above:

'git-grep' [<option>...] [-e] <pattern> [--] [<path>...]
I've thought about this but it is not any more correct than what
we have now (both are technically incorrect).  If you do not use
an `-e` and let a non-option terminate the option processing,
double dashes are not removed, so you do not want it there.
Instead it is more useful for them to be told _specificly_ which 
git-ls-files options  are available and that all others will be 
passed to grep.   Somthing like:
I like it.
...    Your patch fixes the problem case and 
there is no reason now to warn the user away from supplying the --
marker in addition to the "-e"; it'll work properly in either case.
Does it?  I think if you give -- without -e it will look for a
path that matches -- because we pass our own -- to ls-files.
That's it and the rest looked good.  In case you agree with anything
i've said here, find an amended version of your patch below.
Thanks.

When people make an improvement proposal, I'd often prefer to
see a patch that is on top of the patch being discussed, not a
replacement.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help