{"thread":{"id":"33821","subject":"\"git grep --no-index\" doesn't do what it says on the tin?","startedAt":"2013-05-15T05:32:51Z","lastAt":"2013-05-15T06:54:02Z","messageCount":2,"participants":["Nazri Ramliy","Antoine Pelisse"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"217408","messageId":"CAEY4ZpP8txhCCmw-Ck7_rQL+Xn4bJw-RgVa7iDaHzQ6mcS5oLQ@mail.gmail.com","threadId":"33821","inReplyTo":null,"subject":"\"git grep --no-index\" doesn't do what it says on the tin?","fromName":"Nazri Ramliy","fromEmail":"ayiehere@gmail.com","sentAt":"2013-05-15T05:32:51Z","receivedAt":"2013-05-15T05:32:51Z","isPatch":false,"sender":{"key":"ayiehere@gmail.com","avatar":"https://avatars.githubusercontent.com/u/164756?v=4"},"body":"Hi,\n\n>From \"git help grep\":\n\n      --no-index\n           Search files in the current directory that is not managed by Git.\n\n       --untracked\n           In addition to searching in the tracked files in the working tree,\n           search also in untracked files.\n\n>From the description above I would think that \"git grep --no-index\"\nand \"git grep --untracked\" would behave differently, but it seems like\ntheir behavior is the same:\n\n        $ cd ~/src/git\n        $ echo superman >> git.c\n        $ echo superman >> foo.txt\n        $ git grep --no-index superman\n        foo.txt:1:superman\n        git.c:588:superman\n        $ git grep --untracked superman\n        foo.txt:1:superman\n        git.c:588:superman\n\nI would expect the following behavior for \"git grep --no-index\":\n\n        $ git grep --no-index superman\n        foo.txt:1:superman\n        $\n\nThat is, it won't search inside files that are managed by git.\n\nnazri\n"},{"id":"217414","messageId":"CALWbr2wq7QtTXp=tDn27g6_XQjou9FfCvPkXHxmxqws4nTUwxA@mail.gmail.com","threadId":"33821","inReplyTo":"CAEY4ZpP8txhCCmw-Ck7_rQL+Xn4bJw-RgVa7iDaHzQ6mcS5oLQ@mail.gmail.com","subject":"Re: \"git grep --no-index\" doesn't do what it says on the tin?","fromName":"Antoine Pelisse","fromEmail":"apelisse@gmail.com","sentAt":"2013-05-15T06:54:02Z","receivedAt":"2013-05-15T06:54:02Z","isPatch":false,"sender":{"key":"apelisse@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1929644?v=4"},"body":"On Wed, May 15, 2013 at 7:32 AM, Nazri Ramliy <ayiehere@gmail.com> wrote:\n> Hi,\n>\n> From \"git help grep\":\n>\n>       --no-index\n>            Search files in the current directory that is not managed by Git.\n>\n>        --untracked\n>            In addition to searching in the tracked files in the working tree,\n>            search also in untracked files.\n\nThe difference is in the \"not managed by Git\". Inside a repository,\nthey will do the same thing. But only the first can work outside a\nrepository.\n\nCheers,\nAntoine\n"}]}