{"thread":{"id":"29534","subject":"filter-branch ignoring gitattributes?","startedAt":"2012-02-03T12:55:13Z","lastAt":"2012-02-08T08:23:11Z","messageCount":2,"participants":["norbert.nemec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"183715","messageId":"jgglh9$mrv$1@dough.gmane.org","threadId":"29534","inReplyTo":null,"subject":"filter-branch ignoring gitattributes?","fromName":"norbert.nemec","fromEmail":"norbert.nemec@native-instruments.de","sentAt":"2012-02-03T12:55:13Z","receivedAt":"2012-02-03T12:55:13Z","isPatch":false,"sender":{"key":"norbert.nemec@native-instruments.de","avatar":null},"body":"Hi there,\n\nit seems that 'git filter-branch' ignores the setting in\n.git/info/attributes - is that correct?\n\nDoes .gitattributes work reliably?\n\nSpecifically, I tried\n\n\tgit filter-branch \\\n\t\t--tree-filter 'echo \"* text=auto\" > .gitattributes' \\\n             \t--tag-name-filter cat\n\t\t--prune-empty -- --all\n\nIt seems to work, but I am not sure whether I missed anything.\n\nGreetings,\nNorbert\n"},{"id":"184180","messageId":"jgtbdh$ahf$1@dough.gmane.org","threadId":"29534","inReplyTo":"jgglh9$mrv$1@dough.gmane.org","subject":"Re: filter-branch ignoring gitattributes?","fromName":"norbert.nemec","fromEmail":"norbert.nemec@native-instruments.de","sentAt":"2012-02-08T08:23:11Z","receivedAt":"2012-02-08T08:23:11Z","isPatch":false,"sender":{"key":"norbert.nemec@native-instruments.de","avatar":null},"body":"Meanwhile, I can answer my own question:\n\nThe \"text\" attribute works similar to a filter.\nAs with filters in general, it is only applied when git detects a \nmodification in the file. A file change is detected by the file \nmodification time on disc. To reread all files from disk and re-apply \nthe filters to all of them, you would typically delete the .git/index \nfile. In filter-branch, this is not possible, so instead you have to \n\"touch\" all files in the --tree-filter command.\n\n\nAm 03.02.12 13:55, schrieb norbert.nemec:\n> Hi there,\n>\n> it seems that 'git filter-branch' ignores the setting in\n> .git/info/attributes - is that correct?\n>\n> Does .gitattributes work reliably?\n>\n> Specifically, I tried\n>\n> git filter-branch \\\n> --tree-filter 'echo \"* text=auto\" > .gitattributes' \\\n> --tag-name-filter cat\n> --prune-empty -- --all\n>\n> It seems to work, but I am not sure whether I missed anything.\n>\n> Greetings,\n> Norbert\n>\n"}]}