From 07229ef10dccbc1785d6672310040902dc20296e Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 19 Mar 2018 19:49:42 -0700 Subject: [PATCH] Visual Studio Projects: Properly populate .git-commit-id after git clone This only happens if git is installed locally and available in the current path when Visual Studio executes. Whether git is in the path is an installation option when git for Windows is installed. Otherwise, proper results should be available after subsequent activity on the local repository. Any build will install the git hooks that properly populate .git-commit-id when any changes are made to the local repo. --- Visual Studio Projects/Pre-Build-Event.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Visual Studio Projects/Pre-Build-Event.cmd b/Visual Studio Projects/Pre-Build-Event.cmd index 6c964bc2..34164617 100644 --- a/Visual Studio Projects/Pre-Build-Event.cmd +++ b/Visual Studio Projects/Pre-Build-Event.cmd @@ -267,7 +267,7 @@ copy /y git-hooks\post* ..\.git\hooks\ call :WhereInPath git.exe > NUL 2>&1 if %ERRORLEVEL% neq 0 goto _done_hooks pushd .. -git log -1 --pretty="SIM_GIT_COMMIT_ID %H%nSIM_GIT_COMMIT_TIME %aI" >.git-commit-id +git log -1 --pretty="SIM_GIT_COMMIT_ID %%H%%nSIM_GIT_COMMIT_TIME %%aI" >.git-commit-id popd :_done_hooks