pratikvn / schwarz-lib

Repository for testing asynchronous schwarz methods.
https://pratikvn.github.io/schwarz-lib/
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Unable to commit due to git-cmake #12

Closed soumyadipghosh closed 4 years ago

soumyadipghosh commented 4 years ago

I compiled the entire library again after switching off DSCHWARZ_DEVEL_TOOLS. Now I get the following error when I want to commit: can't open file '/afs/crc.nd.edu/user/s/sghosh2/Public/schwarz-lib/build/third_party/git-cmake-format/src/git-cmake-format.py': [Errno 2] No such file or directory

pratikvn commented 4 years ago

Can you do a ccmake . in your build directory and check that the variable SCHWARZ_DEVEL_TOOLS is indeed set to OFF ? Or check your CMakeCache.txt file and check that SCHWARZ_DEVEL_TOOLS there is set to off ?

soumyadipghosh commented 4 years ago

Yes, it is off.

pratikvn commented 4 years ago

Do you have clang-format ? If so, then maybe it is easier to just try putting the -DSCHWARZ_DEVEL_TOOLS=on and seeing if the committing works. If not do a make format and try committing again.

pratikvn commented 4 years ago

If that does not work for some reason, you can try pulling the stuff from the repo from scratch in a temporary folder, creating a new branch and committing and pushing to that branch. Maybe when you did a merge on the event-based branch, something went wrong.

pratikvn commented 4 years ago

I am sorry I was wrong. You cannot commit with -DSCHWARZ_DEVEL_TOOLS=off . That is the reason why you are not able to commit. Can you maybe try to install clang-format instead ?

soumyadipghosh commented 4 years ago

The problem is with the pre-commit hook of .git. When git-cmake-format was installed, it added this code there which was preventing commits since clang-format was not there in our cluster. I commented that and things are fine now!

pratikvn commented 4 years ago

But technically, you want that code because you dont want people to commit before formatting their code. :)