In my git repository I use files with $Id$
content that shall get smudged/cleaned automatically.
For this I configured .gitattributes
to activate the ident filter as documented in the Keyword Expansion
chapter of https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes. So far I shall be happy with the commit numbers.
The documented behaviour works on my Windows machine both natively and in cygwin, and on a Ubuntu 20 box when I checkout/commit manually. I also have a Jenkins pipeline that would process the files - but it seems Jenkins only sees the 'unsmudged' files - all files contain $Id$
.
How can I make the Jenkins pipeline run git such that smudge filters are applied?
So to solve the puzzle above:
This way git checks out the files and runs the smudge filter where necessary. Another advantage is that this way the configuration of the smudge filter only occurs inside the docker container/linux environment. Which means me and my colleagues who are working in Windows environment and usually without a python installation do not have to care at all about the filtering - it will neither be configured nor invoked there.
Credit goes to @phd. Without his hints I would not have been able to crack this nut.