git-rcs-keywords
git-rcs-keywords copied to clipboard
Not working currently?
Unless i rm and checkout again manually every single file, it doesn't seem to work? is it supposed to?
That's right. Smudge is only run on checkout. If you are checking out for the first time (or from another branch) the correct git information is not available. After the initial checkout/switch you can run git checkout HEAD
to "refresh" things.
There's now an installer script to work around this in most cases
Hint: pls see my fork
@kimmormh your install script gives errors on osx
$ ./install.sh
./install.sh: line 20: syntax error near unexpected token `else'
./install.sh: line 20: ` else'
$
@kabel so everytime i commit anything, i need to checkout the whole project? That's less than ideal. I noticed that my original issue wasn't stating alot, but it was meant "after commit & push, unless i rm and checkout the file again it doesn't work"
There's no need to rm. Just doing a checkout (which only takes a second), triggers the filters to run again.
I understand that it's less than ideal, but that's how git works (for smudge/clean filters). You could certainly "automate" this process with git hooks like post-commit
or post-receive
(for remote). In fact, I use a post-receive
hook on my production remote to do just that.
Sorry bout the syntax error guys, it's fixed now
On Fri, 2012-03-09 at 15:39 -0800, dylandog wrote:
It's fixed now
@kimmormh your install script gives errors on osx
$ ./install.sh ./install.sh: line 20: syntax error near unexpected token `else' ./install.sh: line 20: ` else' $
@kabel so everytime i commit anything, i need to checkout the whole project? That's less than ideal. I noticed that my original issue wasn't stating alot, but it was meant "after commit & push, unless i rm and checkout the file again it doesn't work"
Reply to this email directly or view it on GitHub: https://github.com/turon/git-rcs-keywords/issues/10#issuecomment-4426983
@kimmormh confirmed! @kabel would you be so kind to tell me how to use post-commit post-receive to populate the rcs tags automatically? :)
You can install a git hook by installing a file like https://gist.github.com/2024831 in the $GIT_DIR/hooks/
with the name of the hook you'd like to attach it to (do forget to chmod a+x file
).
For more information about how to install git hooks, please see http://schacon.github.com/git/githooks.html
Doesn't work for me either. On Mac: git version 1.8.2.1 (Mac), perl v5.12.4) built for darwin-thread-multi-2level Also on Ubuntu: git version 1.7.9.5, perl v5.14.2) built for x86_64-linux-gnu-thread-multi
Cloned the repo, did: git checkout HEAD and still nothing in hello.c
Any clue?