You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gitinfo2 does not work if the repo is a git submodule, because the .git directory is located elsewhere (in the parent repo), referenced in a .git file as e.g. gitdir: ../.git/modules/my.submodule
For the hook script it is easy to find the correct GIT_DIR: git rev-parse --git-dir
For the style it is more complicated to do this ... I only implemented a proof-of-concept solution that works for building within the root of the submodule, it does no search through the parent directories. The tex part could surely be improved :-)
I haven't even thought about how this should work for nested submodules.
My preliminary patch is attached.
Andreas
PS: Another hint: The no-op command I use for updating gitHeadInfo.gin (especially refreshing dirty state) is git checkout (it does not change the repo, even if something is staged/uncommitted, but it runs the hooks)), integrated somewhere in my Makefile based build system.
Hi,
gitinfo2 does not work if the repo is a git submodule, because the .git directory is located elsewhere (in the parent repo), referenced in a .git file as e.g.
gitdir: ../.git/modules/my.submodule
For the hook script it is easy to find the correct GIT_DIR:
git rev-parse --git-dir
For the style it is more complicated to do this ... I only implemented a proof-of-concept solution that works for building within the root of the submodule, it does no search through the parent directories. The tex part could surely be improved :-)
I haven't even thought about how this should work for nested submodules.
My preliminary patch is attached.
Andreas
PS: Another hint: The no-op command I use for updating gitHeadInfo.gin (especially refreshing dirty state) is
git checkout
(it does not change the repo, even if something is staged/uncommitted, but it runs the hooks)), integrated somewhere in my Makefile based build system.0001-preliminary-support-for-usage-within-a-git-submodule-patch.txt
The text was updated successfully, but these errors were encountered: