* filter-branch ignoring gitattributes?
@ 2012-02-03 12:55 norbert.nemec
2012-02-08 8:23 ` norbert.nemec
0 siblings, 1 reply; 2+ messages in thread
From: norbert.nemec @ 2012-02-03 12:55 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: filter-branch ignoring gitattributes?
2012-02-03 12:55 filter-branch ignoring gitattributes? norbert.nemec
@ 2012-02-08 8:23 ` norbert.nemec
0 siblings, 0 replies; 2+ messages in thread
From: norbert.nemec @ 2012-02-08 8:23 UTC (permalink / raw)
To: git
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-08 8:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 12:55 filter-branch ignoring gitattributes? norbert.nemec
2012-02-08 8:23 ` norbert.nemec
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).