The Smudge filter works perfect.
However the Clean filter does nothing. If even executed I do not know.
In the attributes file at C:\Users\Riaan.config\git\attributes
Then Global filter set:
git config --global filter.Promote.smudge "/C/Users/Riaan/.config/git/Promote.smudge" git config --global filter.Promote.clean "/C/Users/Riaan/.config/git/Promote.clean"
#! /bin/sh -f sed \ -e 's|/u/files1/|U:\\files1\\|' \ -e 's|"SYSTEM"|"MFSYSTEM"|' \ $1
#! /bin/sh -f sed \ -e 's|U:\\files1\\|/u/files1/|' \ -e 's|"MFSYSTEM"|"SYSTEM"|' \ $1
(there are more similar lines excluded for simplicity)
Purpose of both filters are mostly changing linux folder structures into windows format “/u/” into “U:”
Cloning a repository and the smudge filter does execute. Master repository is on linux and my created repository got all the filenames in the windows format.
Promoting programs back to linux and the trigger is just not executed at all. What else must be set.
Note, I’m running git bash on a Windows 10 PC.