Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
REM Install repository Git hooks (Windows)
|
||||
|
||||
for /f "delims=" %%i in ('git rev-parse --show-toplevel') do set REPO_ROOT=%%i
|
||||
cd /d "%REPO_ROOT%"
|
||||
|
||||
git config --local core.hooksPath .githooks
|
||||
|
||||
set CONFIGURED=
|
||||
for /f "delims=" %%i in ('git config --local --get core.hooksPath') do set CONFIGURED=%%i
|
||||
|
||||
if not "%CONFIGURED%"==".githooks" (
|
||||
echo Failed to configure repository Git hooks.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Repository hooks installed: core.hooksPath=.githooks
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user