{"thread":{"id":"51701","subject":"git grep failure?","startedAt":"2019-08-21T03:32:36Z","lastAt":"2019-08-21T04:04:52Z","messageCount":2,"participants":["Wayne Walker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"380875","messageId":"CAJCsJ5fygkaB-=EoYC3EJ3HrBbGUW+cdsXTddUUEyBzT1TB+Zg@mail.gmail.com","threadId":"51701","inReplyTo":null,"subject":"git grep failure?","fromName":"Wayne Walker","fromEmail":"lwaynewalker@gmail.com","sentAt":"2019-08-21T03:32:23Z","receivedAt":"2019-08-21T03:32:36Z","isPatch":false,"sender":{"key":"lwaynewalker@gmail.com","avatar":null},"body":"I use git grep constantly.  Today it failed for me. It isn't looking\nat all the files for some reason.  Am I somehow missing something?\n\nmidsizeschools@ut:~/tams (master u= origin/master)$ git ls-files | wc\n    254     254   10062\nmidsizeschools@ut:~/tams (master u= origin/master)$ git grep -l . | wc\n    250     250    9938\nmidsizeschools@ut:~/tams (master % u= origin/master)$ git grep -l . |\nsort > b\nmidsizeschools@ut:~/tams (master % u= origin/master)$ git ls-files |\nsort > a\nmidsizeschools@ut:~/tams (master % u= origin/master)$ diff a b\n26,27d25\n< app/models/tars_attendee.rb\n< app/models/tars_district_registration.rb\n144d141\n< nbproject/private/config.properties\n156d152\n< public/favicon.ico\n\n# git knows about the file:\n~/tams (master u= origin/master)$ git ls-files | grep\napp/models/tars_district_registration.rb\napp/models/tars_district_registration.rb\n\n# the string is found by grep in the file:\n~/tams (master u= origin/master)$ grep accepts_nested_attributes_for\napp/models/tars_district_registration.rb\naccepts_nested_attributes_for :tars_attendees, :allow_destroy =>\nfalse, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } }\n\n# but git grep doesn't find the file????\n~/tams (master u= origin/master)$ git grep accepts_nested_attributes_for\n~/tams (master u= origin/master)$\n\n# git version is reasonably new - not my server, can't upgrade it\n~/tams (master u= origin/master)$ git --version\ngit version 2.19.2\n\n--\nWayne Walker\nlwaynewalker@gmail.com\n"},{"id":"380876","messageId":"CAJCsJ5fVFiF_GOX30f7dF4D=Fh0gu0p2wPFtCC7EJY+wpSNU2Q@mail.gmail.com","threadId":"51701","inReplyTo":"CAJCsJ5fygkaB-=EoYC3EJ3HrBbGUW+cdsXTddUUEyBzT1TB+Zg@mail.gmail.com","subject":"Re: git grep failure?","fromName":"Wayne Walker","fromEmail":"lwaynewalker@gmail.com","sentAt":"2019-08-21T04:04:39Z","receivedAt":"2019-08-21T04:04:52Z","isPatch":false,"sender":{"key":"lwaynewalker@gmail.com","avatar":null},"body":"Please ignore my previous email.  I have found what causes the\nproblem.  The files that it isn't matching against are symlinks (known\nto git, but git grep apparently doesn't grep what they point to.\n\nSorry to have wasted anyone's time.\n\nWayne Walker\n"}]}