Subject: How to supply "raw" bytes to git grep?

From: Johan Herland <[email-masked]>
Date: Thu, 18 Sep 2008 17:28:18 +0200

Hi,

I wanted to list all text files in my repo which contain carriage 
returns, so I tried the following command-line:

	git grep --cached -I -l -e <CR>

where <CR> is some magic incantation that I've yet to figure out. I've 
tried all the obvious cases (\r, 0x0d, \015, etc.), but none of them 
seem to DWIM...

The only working solution I've found so far is to create a file 
(named "cr") in a hex editor that contains exactly one CR byte, and 
then use the -f option to 'git grep':

	git grep --cached -I -l -f cr

Is there an easier way? And if not, should I try to create one (e.g. 
teaching 'git grep' to grok backslash escapes)?

Have fun!

...Johan

-- 
Johan Herland, <[email-masked]>
www.herland.net