Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create gitHeadInfo.gin #29

Open
paulvickers opened this issue Nov 7, 2017 · 6 comments
Open

Can't create gitHeadInfo.gin #29

paulvickers opened this issue Nov 7, 2017 · 6 comments

Comments

@paulvickers
Copy link

paulvickers commented Nov 7, 2017

I've copied the post-xxx-sample.txt from the same folder as gitinfo2.pdf to post-checkout, post-commit, and post-merge in the .git/hooks folder. I have made them executable with chmod g+x (I'm running mac OS 10.13).

I have run commits and checkouts but the file gitHeadInfo.gin never appears in the working copy's .git folder.

Anything obvious I'm missing here? Do you need to do this from the master branch, or can it be done from any branch?

@paulvickers
Copy link
Author

paulvickers commented Nov 7, 2017

UPDATE:

instead of chmod g+x changed to chmod +x and now the gitHeadInfo.gin file IS created, but the test file reports 'Oh my!' (\usepackage[local,missing={(Oh my!)}...)

But if I remove the local option from the package then it works fine.

@scollovati
Copy link

scollovati commented Mar 29, 2018

@paulvickers I'm experiencing the same problem.
Just to check: what is the exact filename of the post-xxx files?

In my finder I don't see the extension .txt, while it is present via terminal.

Furthermore the permission for each post file is -rwxrwxr-x@
Is it the same for you?

PS: I use osx 10.12.6

@scollovati
Copy link

scollovati commented Mar 29, 2018

Solved.
The problem was very simple: the post-xx file should not have any extension (even if hidden).
Just for future reference, this is the correct setup:
screen shot 2018-03-29 at 18 23 59

Then, as pointed out by @paulvickers, we have to give permissions to all the post-xxx files in this way chmod +x .git/hooks/post-commit (assuming that we are in the root folder of the project i.e. the one in which there's the .git folder).

@afcuttin
Copy link

afcuttin commented Mar 7, 2019

UPDATE:

instead of chmod g+x changed to chmod +x and now the gitHeadInfo.gin file IS created

This is true also for my Ubuntu setup

@stephanmg
Copy link

If you execute the hooks from outside your project root, it will fail too. See the PRs here: https://github.com/CristianCantoro/latex_draft_example/pulls

@josephwright
Copy link

This repository is no longer active: please re-report issues at https://github.com/josephwright/gitinfo2/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants