rbarazzutti / gitinfo2-latexmk

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

Change handling of subdirectories #1

Closed AerysL closed 2 years ago

AerysL commented 5 years ago

Currently the code, if it fails to detect a .git folder (indicating that it is not the root of a git repository), creates a .git directory in the current directory. This pull request changes it such that it retrieves the root of the git repository, and uses the .git directory inside of the root. This allows multiple projects across different directories to use the same gitHeadInfo.gin, as well as better conforms to how gitinfo2 itself handles the directories.

An additional option/alternate handling could be to take advantage of the "local" option of gitinfo2, creating gitHeadLocal.gin in the local directory rather than $REPOBASE/.git/gitHeadInfo.gin (as in this commit).

rbarazzutti commented 2 years ago

Makes a lot of sense.

Thanks a lot!