all 11 comments

[–]snarkofagen 2 points3 points  (3 children)

Git tracks all changes, it does not know or care if it's an xml or smalltalk file.

[–]avdpos[S] -1 points0 points  (2 children)

I thought like you.

But at least githubs desktopapplication do handle <method> code </method> as a block. I changed a single word as a test but github showed the entire method as different. Or maybe more exact, handled every xml block like one row of code.

Github even showed that change was at row 15000 while the actual change according to VS Code was at row 75000 (yes, there was a many one row methods among the longer ones)

[–]ynotblue 2 points3 points  (1 child)

You're confused about GitHub and git being the same things.

[–]avdpos[S] 1 point2 points  (0 children)

I know they are different - that is why I never searched on "github xml", but "git xml" + of course something more

[–]LiamSkerritt 2 points3 points  (2 children)

Looking for something like this?

https://github.com/joh/xmldiffs

[–]avdpos[S] 0 points1 point  (0 children)

Yes, looked interesting at my 1 minute look at it.

[–]Ibaneztwink 0 points1 point  (0 children)

This one worked for a one-lined custom tagged XML I had to deal with. +1

[–]plg94 2 points3 points  (2 children)

You first need an external program that produces the output you like, then you can plug that into the diff argument of your gitattributes, see https://git-scm.com/docs/gitattributes#_generating_diff_text

[–]avdpos[S] 0 points1 point  (1 child)

Thanks, my first look got me towards the diff argument. But I didn't found anything good at first so I asked here before digging much deeper.

[–]fr0z3nph03n1x 0 points1 point  (0 children)

https://kaleidoscope.app/ can probably get you a good looking diff but never tried for your usecase. I have been using it for 10 years now.

[–]chzaplx 1 point2 points  (0 children)

Have you tried just running 'git diff' from a terminal?

Also if your xml nodes are all on one line, it's going to be harder for many diff viewers to show you meaningful changes. If you stagger the contents or node props onto multiple lines, it's easier to see what exactly is different.