Scott Vodicka <svodi...@d-wise.com> writes:

> I am running git on Windows, and the below question applies when I'm
> committing to the local repository.
>
> I have a requirement to substitute keywords in a program header when the
> file is committed.  From what I am finding it looks like I need to use a
> filter.  My plan is to have the filter run a shell script that uses sed to
> replace the keywords.
>
> The filter will be configured as:
>
> In .gitattributes add:
> *.c filter=subvalues
>
> The .gitattributes file is in the local repot .git directory.
>
> then run:
> git config --global filter.subvalues.clean *subvalues*
> git config --global filter.subvalues.smudge cat
>
> where *subvalues *is a shell script that uses sed to search and replace a
> string.
>
> I added a .c file, but the substitution did not seem to happen.
>
> How do I tell if git is running the subvalues script?

Have you tried writing something to stdout in the script?

If not you can temporarily write to another file to do some
printf-debugging.

/M

--
Magnus Therning              OpenPGP: 0x927912051716CE39
email: mag...@therning.org
twitter: magthe              http://magnus.therning.org/

Computers are useless. They can only give you answers.
     — Pablo Picasso

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/87y2igqpy8.fsf%40therning.org.

Attachment: signature.asc
Description: PGP signature

Reply via email to