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

Re: [PATCH/RFC v4] grep: Add the option '--exclude'

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:52:55

On Thu, Feb 2, 2012 at 9:25 PM, Albert Yale [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
index 6a8b1e3..b45706a 100644
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -22,6 +22,7 @@ SYNOPSIS
          [--color[=<when>] | --no-color]
          [-A <post-context>] [-B <pre-context>] [-C <context>]
          [-f <file>] [-e] <pattern>
+          [-x <pattern>|--exclude <pattern>]
          [--and|--or|--not|(|)|-e <pattern>...]
          [ [--exclude-standard] [--cached | --no-index | --untracked] | <tree>...]
          [--] [<pathspec>...]
I'd like to have a careful look at this but haven't found time/energy
yet. So just a minor comment. Please use the term <pathspec> instead
of <pattern>. Exclude pattern has complete different syntax than
pathspec and --exclude followed by "pattern" may give wrong
impression.

I'd also avoid reuse "-x" if it's common for exclude patterns, but
finding a new letter may be difficult. Keep in mind this feature in
the long run benefits more commands than just git-grep and ideally
they should all use the same letter for short option name.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help