KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
886 stars 232 forks source link

Wrapper script to use ktx compare for git diff. #919

Closed MarkCallow closed 5 months ago

MarkCallow commented 5 months ago

Those wishing to use this must run, or have run, install-gitconfig.sh so that .gitconfig, which now includes a "ktx-compare" diff command will be included by their repo clone's .git/config.

They need to have the ktx command installed and in $PATH.

They need to add the line

*.ktx2 binary diff=ktx-compare

to their clone's .git/info/attributes. This is not included in the repo's .gitattributes because not everyone will have the ktx command installed. This will not work in a user-global or system-global Git attributes file because those are lower priority than .gitattributes so are read first and .gitattributes already has an entry for *.ktx2, indicating binary, which overrides anything from the global files.

Will be happy to accept a PR to add a .ps1 equivalent script.