This fixes https://github.com/git-for-windows/git/issues/723

Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
---

        This patch has been carried in Git for Windows in this form since
        Git for Windows v2.11.0(2). It seems to be ready for prime time.

        I could just imagine *one* change: to use

                tr -d 0-9 ' '

        instead of

                tr '.a-zA-Z-' ' '

        However, I am reluctant to do that, as any character that is not
        caught by this pattern would be indicative of something really
        funny going on.

        Plus, I have had really bad experience with changing a well-tested
        patch series just to get it into core Git, only to see an
        immediate breakage introduced to appease reviews. Therefore, this
        time around I will need to be convinced quite a bit more if I am to
        risk breakages.

 Makefile | 3 ++-
 git.rc   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index cd75985991f..ee9d5eb11ee 100644
--- a/Makefile
+++ b/Makefile
@@ -1940,7 +1940,8 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
 
 git.res: git.rc GIT-VERSION-FILE
        $(QUIET_RC)$(RC) \
-         $(join -DMAJOR= -DMINOR=, $(wordlist 1,2,$(subst -, ,$(subst ., 
,$(GIT_VERSION))))) \
+         $(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1, 4, \
+           $(shell echo $(GIT_VERSION) 0 0 0 0 | tr '.a-zA-Z-' ' '))) \
          -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@
 
 # This makes sure we depend on the NO_PERL setting itself.
diff --git a/git.rc b/git.rc
index 33aafb786cf..49002e0d541 100644
--- a/git.rc
+++ b/git.rc
@@ -1,6 +1,6 @@
 1 VERSIONINFO
-FILEVERSION     MAJOR,MINOR,0,0
-PRODUCTVERSION  MAJOR,MINOR,0,0
+FILEVERSION     MAJOR,MINOR,MICRO,PATCHLEVEL
+PRODUCTVERSION  MAJOR,MINOR,MICRO,PATCHLEVEL
 BEGIN
   BLOCK "StringFileInfo"
   BEGIN

base-commit: cb5918aa0d50f50e83787f65c2ddc3dcb10159fe
-- 
2.15.0.windows.1

Published-As: https://github.com/dscho/git/releases/tag/resource-version-v1
Fetch-It-Via: git fetch https://github.com/dscho/git resource-version-v1

Reply via email to