{"thread":{"id":"13682","subject":"git grep and word boundaries","startedAt":"2008-05-27T08:35:46Z","lastAt":"2008-05-27T08:56:12Z","messageCount":2,"participants":["Thomas Volpini","Luciano Rocha"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"77833","messageId":"483BC7E2.6090804@gmx.net","threadId":"13682","inReplyTo":null,"subject":"git grep and word boundaries","fromName":"Thomas Volpini","fromEmail":"tvolpini@gmx.net","sentAt":"2008-05-27T08:35:46Z","receivedAt":"2008-05-27T08:35:46Z","isPatch":false,"sender":{"key":"tvolpini@gmx.net","avatar":null},"body":"Hello,\n\nit seems that git grep doesn't do word boundaries as described:\n\n$ cat bar\nfoo bar baz\n$ grep \"\\<bar\\>\" *\nfoo bar baz\n$ git grep \"\\<bar\\>\" *\n$ git grep -w \"\\<bar\\>\" *\n$ git grep -w \"bar\" *\nbar:foo bar baz\n$ git grep -E \"\\<bar\\>\" *\n$ git grep -E \"\\bbar\\b\" *\n$\n\nthanks,\nThomas\n"},{"id":"77837","messageId":"20080527085612.GA31765@bit.office.eurotux.com","threadId":"13682","inReplyTo":"483BC7E2.6090804@gmx.net","subject":"Re: git grep and word boundaries","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-05-27T08:56:12Z","receivedAt":"2008-05-27T08:56:12Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Tue, May 27, 2008 at 10:35:46AM +0200, Thomas Volpini wrote:\n>  Hello,\n> \n>  it seems that git grep doesn't do word boundaries as described:\n> \n>  $ cat bar\n>  foo bar baz\n>  $ grep \"\\<bar\\>\" *\n>  foo bar baz\n>  $ git grep \"\\<bar\\>\" *\n>  $ git grep -w \"\\<bar\\>\" *\n>  $ git grep -w \"bar\" *\n>  bar:foo bar baz\n>  $ git grep -E \"\\<bar\\>\" *\n>  $ git grep -E \"\\bbar\\b\" *\n>  $\n\nIt works here. Did you add the file?\n$ grep \"\\<bar\\>\" *\nfoo bar baz\n$ git grep \"\\<bar\\>\"\nbar:foo bar baz\n$ git grep \"\\<bar\\>\" *\nbar:foo bar baz\n$ git grep \\\\bbar\\\\b\nbar:foo bar baz\n$ git grep \\\\bbar\\\\b *\nbar:foo bar baz\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"}]}