Re: renormalize histroy with smudge/clean-filter, again
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Feb 14, 2025, 20:21 UTC
- Message-ID
- <Z6-lyJNvXHhrVXhg@tapette.crustytoothpaste.net>
- In-Reply-To
- <20250211235707.GQ30202@raven.inka.de>
On 2025-02-11 at 23:57:07, Josef Wolf wrote:
Show 6 quoted lines
> Still struggling with my filter problem. > > Here is what I do: > > - Set up a clean filter which enforces CRLF (yes, for this specific use > case I want CRLF even on linux)
Is there a reason you can't use `eol=crlf` instead of a smudge/clean filter? That looks like this in the Git repo:
*.bat text eol=crlf
That might be an easier way to accomplish what you want and it will always result in CRLF in the working tree, regardless of operating system, even though in the repository it will still use LF[0].
Note that if you need a specific encoding, there's also `working-tree-encoding` as well.
[0] Okay, technically someone can override it with `.git/info/attributes`, but if they do that and it doesn't work, that's their own fault. We don't worry about that case in this project.
-- brian m. carlson (they/them or he/him) Toronto, Ontario, CA