git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "norbert.nemec" <norbert.nemec@native-instruments.de>
To: git@vger.kernel.org
Subject: Re: filter-branch ignoring gitattributes?
Date: Wed, 08 Feb 2012 09:23:11 +0100	[thread overview]
Message-ID: <jgtbdh$ahf$1@dough.gmane.org> (raw)
In-Reply-To: <jgglh9$mrv$1@dough.gmane.org>

Meanwhile, I can answer my own question:

The "text" attribute works similar to a filter.
As with filters in general, it is only applied when git detects a 
modification in the file. A file change is detected by the file 
modification time on disc. To reread all files from disk and re-apply 
the filters to all of them, you would typically delete the .git/index 
file. In filter-branch, this is not possible, so instead you have to 
"touch" all files in the --tree-filter command.


Am 03.02.12 13:55, schrieb norbert.nemec:
> Hi there,
>
> it seems that 'git filter-branch' ignores the setting in
> .git/info/attributes - is that correct?
>
> Does .gitattributes work reliably?
>
> Specifically, I tried
>
> git filter-branch \
> --tree-filter 'echo "* text=auto" > .gitattributes' \
> --tag-name-filter cat
> --prune-empty -- --all
>
> It seems to work, but I am not sure whether I missed anything.
>
> Greetings,
> Norbert
>

      reply	other threads:[~2012-02-08  8:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 12:55 filter-branch ignoring gitattributes? norbert.nemec
2012-02-08  8:23 ` norbert.nemec [this message]

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='jgtbdh$ahf$1@dough.gmane.org' \
    --to=norbert.nemec@native-instruments.de \
    --cc=git@vger.kernel.org \
    /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).