{"thread":{"id":"47348","subject":"Git filter clean not working when staging files","startedAt":"2017-11-29T17:59:18Z","lastAt":"2017-11-29T17:59:18Z","messageCount":1,"participants":["Rafał Treffler"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"333792","messageId":"CAHY8k2DJSQjXrjTq6nysnifNppzLtSsORqseB2J0q1bYnkCF-A@mail.gmail.com","threadId":"47348","inReplyTo":null,"subject":"Git filter clean not working when staging files","fromName":"Rafał Treffler","fromEmail":"tothamon@gmail.com","sentAt":"2017-11-29T17:58:53Z","receivedAt":"2017-11-29T17:59:18Z","isPatch":false,"sender":{"key":"tothamon@gmail.com","avatar":null},"body":"Hello,\n\nI've got a question or maybe bug about Git clean filter.\nAccording to documentation[1] clean should be run when staging files.\nWhen I'm staging file I see my script was run (I'm logging execution\ninto /tmp), but file content is unmodified.\nMy script is reading stdin and writing to stdout.\nNothing breaks in the script, from logs I see the source and modified\ncontent are proper and I'm returning 0 return code.\n\nIs this behavior intended? What should I do to modify the content?\n\nSmudge works as intended.\nBut I've also noticed that git status runs clean filter but does not\nmodify contents.\nIs that also intended?\n\nMaybe I'm missing something?\n\nIf this is not going to work,\nis there other way to modify file content on commit? (so the fixed\ncontent goes to local repo)\nAny other options ?\n\n[1] https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#filters_b\n\n-- \nThanks for help,\nRafal\n"}]}