REGoth-project / REGoth

OpenSource-Reimplementation of the zEngine, used by the game "Gothic"
GNU General Public License v3.0
631 stars 62 forks source link

fixed incorrect creation of symlink for pre-commit hook #232

Closed markusobi closed 6 years ago

markusobi commented 7 years ago

This is what it looks like now:

$git commit 

The following files do not match the clang-format rules:

    src/target/REGoth.cpp

Differences:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
--- a/src/target/REGoth.cpp 2017-10-20 21:15:00.442098201 +0200
+++ b/src/target/REGoth.cpp 2017-10-20 21:15:07.622936504 +0200
@@ -294,7 +294,7 @@
     });

     console.registerCommand("foobar", [this](const std::vector<std::string>& args) -> std::string {
-    return "foobar!";
+        return "foobar!";
     });

     console.registerCommand("set day", [this](const std::vector<std::string>& args) -> std::string {
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Should the changes be added to the commit (y/n/abort)?
 - (y)es : apply formatting and proceed with commit
 - (n)o : proceed with commit (do not apply formatting)
 - (a)bort : abort commit
y
Applying formatting on files:
    src/target/REGoth.cpp
[TestGitHook2 28ae2b3] asdsadasda
 1 file changed, 2 deletions(-)
markusobi commented 7 years ago

the pre-commit hook doesn't work properly at the moment. The files are changed, but the added/committed files are unchanged.

ataulien commented 7 years ago

I'm not really into this stuff, I guess you can just merge it if it's ready!

markusobi commented 7 years ago

ATM the hook is reformatting the work-place files after committing. This means, that

I am not sure, when the formatting is supposed to happen.

markusobi commented 7 years ago

I found an other pre-commit hook-script, that will create a patch for the formatting. I'll add it soon.