Re: renormalize histroy with smudge/clean-filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 08, 2025 at 09:57:09PM +0100, Josef Wolf wrote:

I just stumbled over another wirdeness:

> Oh, have I mentioned that I am not only about line endings? Yes, I mentioned
> it in the very first mail. In addition to line endings, I am also about XML
> files from a proprietary application which reorders the XML-elements into a
> random order every time it ist run. So the clean-filter needs to sort the
> XML elements into some "canonical" order.

This application stores the bulk of the data as text files and XML files with
CRLF. But there are also some binary files. So I set gitattributes like this:

   # Catch bulk as text=crlf, rely on git to detect binary
   */*     text=auto eol=crlf
   #
   # those are known to be text=crlf
   */B     text eol=crlf
   */P-*   text eol=crlf
   #
   # smudge-clean filter
   */B     filter=etsfile
   */P-*   filter=etsfile
   #
   # files I dont't want to touch (mostly binaries)
   */*.dll       -filter -text
   */*.ver       -filter -text
   */*.lang      -filter -text
   */*.store     -filter -text
   */*.ets5hash  -filter -text

But "git ls-files --eol" gives me this:

     i/lf    w/lf    attr/text eol=crlf      gt8/ETS/Projekte/P-0113/B

Why is git ignoring my explicit CRLF setting?

This is on linux and on Windows+MSYS2. I don't have $GIT_DIR/info/attributes
and ~/.gitconfig also doesn't specify any line ending things

-- 
Josef Wolf
jw@xxxxxxxxxxxxx




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux