{"thread":{"id":"49802","subject":"grep issues","startedAt":"2018-11-11T13:18:05Z","lastAt":"2018-11-20T05:21:58Z","messageCount":2,"participants":["Orgad Shaneh","Torsten Bögershausen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"362943","messageId":"CAGHpTB+fQccqR8SF2_dS3itboKd79238KCFRe4-3PZz6bpr3iQ@mail.gmail.com","threadId":"49802","inReplyTo":null,"subject":"grep issues","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2018-11-11T13:17:50Z","receivedAt":"2018-11-11T13:18:05Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"Hi,\n\nI found 2 bugs in grep, using Git for Windows 2.19.1 (but noticed\nthese several versions ago):\n\n1. git grep --recursive on a worktree (without rev) always matches\nagainst the submodule's HEAD, not its worktree, as it should.\n2. When core.autocrlf (or eol=crlf) is used, and a file in the\nworktree has CRLF, git grep fails to match $ against EOL.\n\nFor example:\ngit init\necho 'file eol=crlf' > .gitattributes\necho ABCD > file\ngit add file\ngit commit -m 'CRLF'\nrm file\ngit checkout -f file\ngit grep 'D$' file # Nothing\ngit grep 'D$' HEAD -- file # Found!\n\n- Orgad\n"},{"id":"363699","messageId":"20181120052154.GB16814@tor.lan","threadId":"49802","inReplyTo":"CAGHpTB+fQccqR8SF2_dS3itboKd79238KCFRe4-3PZz6bpr3iQ@mail.gmail.com","subject":"Re: grep issues","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2018-11-20T05:21:54Z","receivedAt":"2018-11-20T05:21:58Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On Sun, Nov 11, 2018 at 03:17:50PM +0200, Orgad Shaneh wrote:\n> Hi,\n> \n> I found 2 bugs in grep, using Git for Windows 2.19.1 (but noticed\n> these several versions ago):\n> \n> 1. git grep --recursive on a worktree (without rev) always matches\n> against the submodule's HEAD, not its worktree, as it should.\n> 2. When core.autocrlf (or eol=crlf) is used, and a file in the\n> worktree has CRLF, git grep fails to match $ against EOL.\n> \n> For example:\n> git init\n> echo 'file eol=crlf' > .gitattributes\n> echo ABCD > file\n> git add file\n> git commit -m 'CRLF'\n> rm file\n> git checkout -f file\n> git grep 'D$' file # Nothing\n> git grep 'D$' HEAD -- file # Found!\n> \n> - Orgad\n\nI can confirm the \"2. When core.autocrlf\" bug, or should we call\nit a non-implemented feature.\nIt seems as if a convert_to_git() is needed in grep.c,\nbut I haven't found the time to dig deeper.\nDoes anybody wants to work on this ?\n"}]}