rbarazzutti / gitinfo2-latexmk

Use LaTeX's gitinfo2 with almost no effort
LaTeX Project Public License v1.3c
9 stars 3 forks source link

I can't find the file '.git/gitHeadInfo.gin' #4

Open tdegeus opened 1 year ago

tdegeus commented 1 year ago

I have placed

gitinfo2.pm

in my project's main folder. In that same folder I have added a .latexmkrc with content

do './gitinfo2.pm';

In addition I added

\usepackage[mark]{gitinfo2}

to my document.

However, with

latexmk -pdf main.tex

I get

Package gitinfo2 Warning: I can't find the file '.git/gitHeadInfo.gin'.
(gitinfo2)                All git metadata has been set to '(None)'.
tdegeus commented 1 year ago

I finally got it. There was no release, which is required by gitinfo2. Personally I would find it great to be looser on this restriction. Did you ever consider being looser?

eelcovv commented 1 year ago

Agree, also you are not allowed to use the script for a dirty repository. I have forked the script and added a -force option to allow to use the script for dirty repositories as well. Hopefully my pull request is accepted. For the rest this script works like a charm!