{"thread":{"id":"49873","subject":"git grep prints colon instead of slash","startedAt":"2018-11-21T13:54:42Z","lastAt":"2018-11-21T13:59:24Z","messageCount":2,"participants":["Marc Gonzalez","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"363825","messageId":"5d3618d4-8a5a-b4dc-3cc9-4134cd73675a@free.fr","threadId":"49873","inReplyTo":null,"subject":"git grep prints colon instead of slash","fromName":"Marc Gonzalez","fromEmail":"marc.w.gonzalez@free.fr","sentAt":"2018-11-21T13:54:34Z","receivedAt":"2018-11-21T13:54:42Z","isPatch":false,"sender":{"key":"marc.w.gonzalez@free.fr","avatar":null},"body":"Hello,\n\nI'm using an older version of git, so this particular issue might have\nalready been fixed.\n\n$ git --version\ngit version 2.17.1\n\n\nIf I specify the branch to explore, git grep prints a colon instead of\na slash in the path:\n\n$ git grep arm,coresight-tmc master:Documentation/devicetree\nmaster:Documentation/devicetree:bindings/arm/coresight.txt:                     \"arm,coresight-tmc\", \"arm,primecell\";\nmaster:Documentation/devicetree:bindings/arm/coresight.txt:             compatible = \"arm,coresight-tmc\", \"arm,primecell\";\n                               ^\n                              HERE\n\nThere is no such issue when the branch is not specified:\n\n$ git grep arm,coresight-tmc Documentation/devicetree\nDocumentation/devicetree/bindings/arm/coresight.txt:                    \"arm,coresight-tmc\", \"arm,primecell\";\nDocumentation/devicetree/bindings/arm/coresight.txt:            compatible = \"arm,coresight-tmc\", \"arm,primecell\";\n                        ^\n                    NO ISSUE\n\n\nIs this expected behavior?\nThe spurious colon prevents one from simply copy/pasting the output.\n\nRegards.\n"},{"id":"363826","messageId":"20181121135921.GA9586@sigill.intra.peff.net","threadId":"49873","inReplyTo":"5d3618d4-8a5a-b4dc-3cc9-4134cd73675a@free.fr","subject":"Re: git grep prints colon instead of slash","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-11-21T13:59:21Z","receivedAt":"2018-11-21T13:59:24Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 21, 2018 at 02:54:34PM +0100, Marc Gonzalez wrote:\n\n> If I specify the branch to explore, git grep prints a colon instead of\n> a slash in the path:\n> \n> $ git grep arm,coresight-tmc master:Documentation/devicetree\n> master:Documentation/devicetree:bindings/arm/coresight.txt:                     \"arm,coresight-tmc\", \"arm,primecell\";\n> master:Documentation/devicetree:bindings/arm/coresight.txt:             compatible = \"arm,coresight-tmc\", \"arm,primecell\";\n>                                ^\n>                               HERE\n> \n> There is no such issue when the branch is not specified:\n> \n> $ git grep arm,coresight-tmc Documentation/devicetree\n> Documentation/devicetree/bindings/arm/coresight.txt:                    \"arm,coresight-tmc\", \"arm,primecell\";\n> Documentation/devicetree/bindings/arm/coresight.txt:            compatible = \"arm,coresight-tmc\", \"arm,primecell\";\n>                         ^\n>                     NO ISSUE\n> \n> \n> Is this expected behavior?\n> The spurious colon prevents one from simply copy/pasting the output.\n\nThere's lots of discussion in this thread from last year:\n\n  https://public-inbox.org/git/20170119150347.3484-1-stefanha@redhat.com/\n\nNotably:\n\n  git grep arm,coresight-tmc master -- Documentation/devicetree\n\nwill do what you want.\n\n-Peff\n"}]}