git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: skillzero@gmail.com
Subject: Re: git list binary and/or non-binary files?
Date: Tue, 25 Aug 2009 00:14:03 +0200	[thread overview]
Message-ID: <200908250014.03585.johan@herland.net> (raw)
In-Reply-To: <2729632a0908241450m1651c77ata9744058c5d42672@mail.gmail.com>

On Monday 24 August 2009, skillzero@gmail.com wrote:
> Is there a way to list the files git considers binary in a repository
> (and alternatively, the ones it considers text)? I have a large
> repository and I want to fix line endings for text files that were
> accidentally checked in using CRLF and can't just use the file
> extension alone because some files with the same extension may be
> binary and others not (e.g. UTF-8 .strings file is text, but a UTF-16
> .strings file is binary...git already figured out based on the content
> that one is binary).
>
> I thought maybe git ls-files, but I didn't see anything in there I can
> use for binary vs text.

I use the following to list files that contain CRs, but that are not 
considered binary by Git:

  git grep --cached -I -l -e $'\r'

'git help grep' explains all the options...


Have fun! :)

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

  reply	other threads:[~2009-08-24 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-24 21:50 git list binary and/or non-binary files? skillzero
2009-08-24 22:14 ` Johan Herland [this message]
2009-08-24 22:39   ` skillzero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908250014.03585.johan@herland.net \
    --to=johan@herland.net \
    --cc=git@vger.kernel.org \
    --cc=skillzero@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).