From d37fa159b251b167025693e7e9c5936b5e82703f Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Tue, 22 Apr 2014 21:26:29 +0100 Subject: [PATCH] Re: [PATCH 1/1] building from git: use --abbrev=7 for version string --- 5c/35640a6607b1e8e4d032368195c3a525270520 | 115 ++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 5c/35640a6607b1e8e4d032368195c3a525270520 diff --git a/5c/35640a6607b1e8e4d032368195c3a525270520 b/5c/35640a6607b1e8e4d032368195c3a525270520 new file mode 100644 index 000000000..cbfedbbb3 --- /dev/null +++ b/5c/35640a6607b1e8e4d032368195c3a525270520 @@ -0,0 +1,115 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1AA02431FBF + for ; Tue, 22 Apr 2014 13:26:51 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.502 +X-Spam-Level: +X-Spam-Status: No, score=0.502 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id YgfhF0Lha0xt for ; + Tue, 22 Apr 2014 13:26:47 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id C6DCA431FBD + for ; Tue, 22 Apr 2014 13:26:46 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1WchH3-00081x-B3; Tue, 22 Apr 2014 21:26:41 +0100 +Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1WchH2-0002f2-Tu; Tue, 22 Apr 2014 21:26:37 +0100 +From: Mark Walters +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/1] building from git: use --abbrev=7 for version string +In-Reply-To: <1398179984-29531-1-git-send-email-tomi.ollila@iki.fi> +References: <1398179984-29531-1-git-send-email-tomi.ollila@iki.fi> +User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Tue, 22 Apr 2014 21:26:29 +0100 +Message-ID: <87zjjdaz62.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 87.81.223.162 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 2a648d4bf92f629e37d43a18278728bb (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: tomi.ollila@iki.fi +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 22 Apr 2014 20:26:51 -0000 + + +LGTM +1 + +MW + +On Tue, 22 Apr 2014, Tomi Ollila wrote: +> Users may have set core.abbrev=n, where n != 7 in their git config +> file(s) which would give them different than expected version strings +> when building notmuch from git. This fixes the commit hash part of +> version string to 7 hexadecimal values. +> --- +> +> tested with: +> git config core.abbrev 12 +> git describe +> rm version.stamp +> make +> cat version.stamp +> git reset --hard origin/master +> make +> cat version.stamp +> +> .local | 2 +- +> 1 file changed, 1 insertion(+), 1 deletion(-) +> +> diff --git a/Makefile.local b/Makefile.local +> index 877a979..6e78368 100644 +> --- a/Makefile.local +> +++ b/Makefile.local +> @@ -21,7 +21,7 @@ endif +> VERSION:=$(shell cat ${srcdir}/version) +> ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),) +> ifeq ($(IS_GIT),yes) +> -VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) +> +VERSION:=$(shell git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) +> # Write the file 'version.stamp' in case its contents differ from $(VERSION) +> FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs) +> ifneq ($(FILE_VERSION),$(VERSION)) +> -- +> 1.9.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2