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

GitHooks does not handle running in submodules #603

Open
umlaeute opened this issue Mar 7, 2023 · 0 comments · May be fixed by #604
Open

GitHooks does not handle running in submodules #603

umlaeute opened this issue Mar 7, 2023 · 0 comments · May be fixed by #604

Comments

@umlaeute
Copy link

umlaeute commented Mar 7, 2023

I'm trying to use Servus in a project of mine.
Since it is not packaged for my distribution, i included Servus via a git submodule.
Servus in turn includes this repository (via git submodule, but I think that doesn't matter here).

Now trying to build the submoduled Servus fails happily with:

CMake Error: Could not open file for write in copy operation .../Servus/.git/hooks/pre-commit.tmp
CMake Error: : System Error: Not a directory
CMake Error at CMake/common/GitHooks.cmake:18 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMake/common/Common.cmake:152 (include)
  CMakeLists.txt:35 (include)

And yes, .../Servus/.git is not a directory, but a file (that contains a reference to the parent repository).
afaik, this is how git submodules work.

Since the GitHooks snippet already ignores the case where .git is missing altogether, it probably should do something sensible if it is not a directory as well...

This has also been reported in in Servus as HBPVIS/Servus#108

umlaeute added a commit to umlaeute/EyeScale-CMake that referenced this issue Mar 7, 2023
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

Successfully merging a pull request may close this issue.

1 participant