I want to apply this filter in my git repository to remove a section from a solution file during validation and add this section during commit.
This is the section I want to delete or add:
GlobalSection(SubversionScc) = preSolution Svn-Managed = True Manager = AnkhSVN - Subversion Support for Visual Studio EndGlobalSection
I set this filter in my .git / info / attributes
*. sln filter = SourceControlProvider
and I added these commands to my configuration
$ git config filter.SourceControlProvider.smudge "sed -e '/GlobalSection(SubversionScc)/,/EndGlobalSection/d' %" $ git config filter.SourceControlProvider.clean "sed -n -e '/^Global$/ r ankhsvnsection ' < %"
Well, that doesn't work. What did I do wrong?
ankhsvnsection - a text file that is in the same directory as the * .sln file
git filter sed gitattributes
mrt181
source share