[PATCH v2 2/2] Makefile: get the git version from the submodule

John Keeping john at keeping.me.uk
Mon Mar 4 14:34:12 CET 2013


On Mon, Mar 04, 2013 at 02:26:38PM +0100, Ferry Huberts wrote:
> From: Ferry Huberts <ferry.huberts at pelagic.nl>
> 
> No more need to update Makefile when we switch git versions

Thanks for fixing my omission with the version number.  I don't think
this patch is a good idea though - the whole point of GIT_VER (and the
get-git target that uses it) is to download a suitable version of Git
without needing to have git available.  If we change GIT_VER to rely on
the submodule existing then we might as well delete it entirely.

I do wonder if we should change GIT_URL to point at:

    https://git-core.googlecode.com/files/git-$(GIT_VER).tar.gz

since that's the URL in the Git release note.

> Signed-off-by: Ferry Huberts <ferry.huberts at pelagic.nl>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 118a2c9..6d834ed 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -14,8 +14,8 @@ htmldir = $(docdir)
>  pdfdir = $(docdir)
>  mandir = $(prefix)/share/man
>  SHA1_HEADER = <openssl/sha.h>
> -GIT_VER = 1.7.12.4
> -GIT_URL = https://github.com/git/git/archive/v$(GIT_VER).tar.gz
> +GIT_VER = $(shell git submodule status git | sed -r 's/^[^0-9a-fA-F]*([0-9a-fA-F]*).*/\1/')
> +GIT_URL = https://github.com/git/git/archive/$(GIT_VER).tar.gz
>  INSTALL = install
>  MAN5_TXT = $(wildcard *.5.txt)
>  MAN_TXT  = $(MAN5_TXT)
> -- 
> 1.7.11.7




More information about the CGit mailing list