Background: I'm working on a repository that houses files needed for another program to run. Due to the nature of the other program, files that need to call other files have to do so with full file paths. All these files are stored in the repository, so I made a smudge/clean filter to change the file paths from a generic one to the path to repository location. This solution is required since multiple people may be cloning the repository to different locations to make modifications and test them.
Problem: The filter is working correctly, but the problem I'm encountering now is that whenever I checkout a new branch the clean filter is running instead of the smudge filter. From my understanding, the smudge filter should be the running at checkout, not the clean filter. Does anyone know why the clean filter is running when the smudge filter should and how to fix that?
Observations: No filters are used jumping from branches set up to use the filter and ones not setup to use the filter.
The smudge filter is used when jumping from a branch not setup to use filters to one setup yo use them.
The clean filter is used when switching between two branches that are setup to use the filter.
The smudge filter is run when a file is deleted and checkout again.
The clean filter is run seemingly at random when is run git status
.
Confirmed which filters are being used on each file by setting GIT_TRACE=1
and looking at the line git is running as well as piping some updates from stdout to stderr in the filter script so that they appear in the command window.