[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [msysGit] [PATCH v2] Makefile: Fix compilation of Windows resource file
From:       Johannes Sixt <j.sixt () viscovery ! net>
Date:       2014-01-23 14:16:46
Message-ID: 52E1244E.4010503 () viscovery ! net
[Download RAW message or body]

Am 1/23/2014 13:02, schrieb Pat Thoyts:
> On 23 January 2014 07:28, Johannes Sixt <j.sixt@viscovery.net> wrote:
> > @@ -1773,7 +1773,7 @@ $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES
> > 
> > git.res: git.rc GIT-VERSION-FILE
> > $(QUIET_RC)$(RC) \
> > -         $(join -DMAJOR= -DMINOR= -DPATCH=, $(wordlist 1,3,$(subst -, ,$(subst \
> > ., ,$(GIT_VERSION))))) \ +         $(join -DMAJOR= -DMINOR=, $(wordlist \
> >                 1,2,$(subst -, ,$(subst ., ,$(GIT_VERSION))))) \
> > -DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" $< -o $@
> > 
> > ifndef NO_PERL
> 
> This was put in as a response to
> https://github.com/msysgit/git/issues/5 where a request was made to be
> able to check the version without actually executing the file.

If I understand the request correctly, it is about manual inspection. The
correct version string for this purpose is recorded via -DGIT_VERSION.

> Given
> that the majority of versions has the same first two digits this
> becomes fairly useless without the patchlevel digit. So it would be
> preferable to try to maintain all three digits. The following should
> do this:
> 
> GIT_VERSION=1.9.rc0
> all:
> echo $(join -DMAJOR= -DMINOR= -DPATCH=, \
> $(wordlist 1,3,$(filter-out rc%,$(subst -, ,$(subst .,
> ,$(GIT_VERSION)))) 0 0))
> 
> This removes any rc* parts and appends a couple of zeros so that all
> missing elements should appear as 0 in the final list.

As Junio already pointed out, this records the wrong number in the 1.9
track before 1.9.1 is out because the third position is the commit count,
not the patch level.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic