git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git grep -F doesn't behave like grep -F?
@ 2012-05-18 11:00 Torne (Richard Coles)
  2012-05-18 12:37 ` René Scharfe
  0 siblings, 1 reply; 8+ messages in thread
From: Torne (Richard Coles) @ 2012-05-18 11:00 UTC (permalink / raw)
  To: git

Hi folks,

git grep -F is documented as: "Use fixed strings for patterns (don’t
interpret pattern as a regex)."

whereas grep -F is documented as "Interpret PATTERN as a  list  of
fixed  strings,  separated  by newlines,  any  of  which is to be
matched."

This accurately describes how they behave, which means that git grep
-F with a pattern containing newlines never matches anything (at least
as far as I can see). Is this intentional, or an oversight? The
ability to grep -F for a list (e.g. the output of another grep) is
pretty handy...

-- 
Torne (Richard Coles)
torne@google.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-21 16:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 11:00 git grep -F doesn't behave like grep -F? Torne (Richard Coles)
2012-05-18 12:37 ` René Scharfe
2012-05-18 12:41   ` Torne (Richard Coles)
2012-05-20 14:32     ` [PATCH 1/3] grep: factor out create_grep_pat() René Scharfe
2012-05-20 14:32     ` [PATCH 2/3] grep: factor out do_append_grep_pat() René Scharfe
2012-05-20 14:33     ` [PATCH 3/3] grep: support newline separated pattern list René Scharfe
2012-05-20 22:29       ` Junio C Hamano
2012-05-21 16:10         ` René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).