git-rcs-keywords icon indicating copy to clipboard operation
git-rcs-keywords copied to clipboard

Not working currently?

Open dylandog opened this issue 12 years ago • 10 comments

Unless i rm and checkout again manually every single file, it doesn't seem to work? is it supposed to?

dylandog avatar Mar 08 '12 00:03 dylandog

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.

kabel avatar Mar 09 '12 04:03 kabel

There's now an installer script to work around this in most cases

kimmormh avatar Mar 09 '12 06:03 kimmormh

Hint: pls see my fork

kimmormh avatar Mar 09 '12 06:03 kimmormh

@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"

dylandog avatar Mar 09 '12 23:03 dylandog

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.

kabel avatar Mar 10 '12 23:03 kabel

Sorry bout the syntax error guys, it's fixed now

kimmormh avatar Mar 11 '12 15:03 kimmormh

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 avatar Mar 11 '12 15:03 kimmormh

@kimmormh confirmed! @kabel would you be so kind to tell me how to use post-commit post-receive to populate the rcs tags automatically? :)

dylandog avatar Mar 11 '12 22:03 dylandog

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

kabel avatar Mar 12 '12 21:03 kabel

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?

kenorb avatar Jun 20 '13 01:06 kenorb