{"thread":{"id":"17946","subject":"git-grep: small suggestion, -w flag","startedAt":"2009-02-22T10:34:48Z","lastAt":"2009-02-22T17:23:00Z","messageCount":5,"participants":["Ingo Molnar","René Scharfe","Miklos Vajna"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"105757","messageId":"20090222103448.GA32119@elte.hu","threadId":"17946","inReplyTo":null,"subject":"git-grep: small suggestion, -w flag","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2009-02-22T10:34:48Z","receivedAt":"2009-02-22T10:34:48Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"Here's a stupid little git-grep suggestion.\n\nI recently transitioned from the use of egrep to git-grep, and i \nlike it very much (it nicely excludes build related files, \netc.), but there's one small detail: the lack of the -w flag.\n\nIt's equivalent to this pattern:\n\n   git grep '\\<tick_length\\>'\n\nAnd it's the most common grep flag i (and i suspect many others) \nuse, in addition to the (already supported) -l flag.\n\nWhen grepping for symbols in a large repository (such as the \nLinux kernel) -w is very common and very useful - there's many \nsimilar symbols, variants of each other. I use it when seeing a \nsymbol in an oops, etc.\n\nWhile i realize that git-grep does not want to be a full grep \nreplacement, there's a real usability difference between having \nto type:\n\n   git grep '\\<schedule\\>'\n   git grep -w schedule\n\n(especially since backslash is a seldom used key during a normal \nworkflow, so accessing it is often a small mental hickup.)\n\n\tIngo\n"},{"id":"105759","messageId":"49A133C9.2030601@lsrfire.ath.cx","threadId":"17946","inReplyTo":"20090222103448.GA32119@elte.hu","subject":"Re: git-grep: small suggestion, -w flag","fromName":"René Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2009-02-22T11:15:21Z","receivedAt":"2009-02-22T11:15:21Z","isPatch":false,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Ingo Molnar schrieb:\n> Here's a stupid little git-grep suggestion.\n> \n> I recently transitioned from the use of egrep to git-grep, and i \n> like it very much (it nicely excludes build related files, \n> etc.), but there's one small detail: the lack of the -w flag.\n\ngit grep knows this flag since version 1.4.1.  Does it do something\ndifferent from egrep's?\n\nRené\n"},{"id":"105774","messageId":"20090222161410.GA24886@elte.hu","threadId":"17946","inReplyTo":"49A133C9.2030601@lsrfire.ath.cx","subject":"Re: git-grep: small suggestion, -w flag","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2009-02-22T16:14:10Z","receivedAt":"2009-02-22T16:14:10Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* René Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:\n\n> Ingo Molnar schrieb:\n> > Here's a stupid little git-grep suggestion.\n> > \n> > I recently transitioned from the use of egrep to git-grep, and i \n> > like it very much (it nicely excludes build related files, \n> > etc.), but there's one small detail: the lack of the -w flag.\n> \n> git grep knows this flag since version 1.4.1.  Does it do \n> something different from egrep's?\n\nah:\n\n earth4:~/tip> git grep -lw schedule\n usage: git grep <option>* [-e] <pattern> <rev>* [[--] <path>...]\n\n\nshould have been 'git grep -l -w schedule'.\n\n\tIngo\n"},{"id":"105789","messageId":"20090222172055.GW4371@genesis.frugalware.org","threadId":"17946","inReplyTo":"20090222161410.GA24886@elte.hu","subject":"Re: git-grep: small suggestion, -w flag","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2009-02-22T17:20:55Z","receivedAt":"2009-02-22T17:20:55Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sun, Feb 22, 2009 at 05:14:10PM +0100, Ingo Molnar <mingo@elte.hu> wrote:\n>  earth4:~/tip> git grep -lw schedule\n>  usage: git grep <option>* [-e] <pattern> <rev>* [[--] <path>...]\n> \n> \n> should have been 'git grep -l -w schedule'.\n\nYeah, that's because git-grep does not use parseopt yet.\n\nI'm willing to work on it once mv/parseopt-ls-files is settled down.\n"},{"id":"105790","messageId":"20090222172300.GF6570@elte.hu","threadId":"17946","inReplyTo":"20090222172055.GW4371@genesis.frugalware.org","subject":"Re: git-grep: small suggestion, -w flag","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2009-02-22T17:23:00Z","receivedAt":"2009-02-22T17:23:00Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Miklos Vajna <vmiklos@frugalware.org> wrote:\n\n> On Sun, Feb 22, 2009 at 05:14:10PM +0100, Ingo Molnar <mingo@elte.hu> wrote:\n> >  earth4:~/tip> git grep -lw schedule\n> >  usage: git grep <option>* [-e] <pattern> <rev>* [[--] <path>...]\n> > \n> > \n> > should have been 'git grep -l -w schedule'.\n> \n> Yeah, that's because git-grep does not use parseopt yet.\n> \n> I'm willing to work on it once mv/parseopt-ls-files is settled \n> down.\n\nAs long as it's planned eventually i'm a happy camper! No rush.\n\n\tIngo\n"}]}