minad / olelo

Wiki with git backend
MIT License
241 stars 44 forks source link

Update files in work dir for non-bare repo #27

Open tg-x opened 14 years ago

tg-x commented 14 years ago

if repo type is non-bare the checked out files should be updated in the repo after a commit (i tried to fix this with a post-commit hook but hooks does not seem to be run either)

marvin2k commented 14 years ago

It's not wise to update non-bare repos by default, since there could be local changes, which would be overwritten. People will be angry because they lost their work. A warning/error message would maybe helpfull, if one uses a non-bare repo

I solved a similar issue using a second repo, which pulls and pushes manually into the bare repo. Works, sort of...

Did you made your post-commit hook executable?

tg-x commented 14 years ago

well, in my case I know there won't be local changes, thus it would be useful to have an option in the config for this, I don't say it should be the default

or at least the hooks should be run, I checked the post-commit is executable and it's not being called after saving a page

marvin2k commented 14 years ago

hm, you are right, mine isn't called either... I can't find a place, where a proper "git commit" from gitrb is called, only "blob new"... But I'm not a pro...

minad commented 14 years ago

gitrb has a transaction method which does the commit. post-commit hooks are currently ignored by gitrb. I added an issue to gitrb: http://github.com/minad/gitrb/issues/issue/8

minad commented 11 years ago

Rugged is now used to access the git repository. See issue https://github.com/libgit2/libgit2/issues/964