From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: merlyn@stonehenge.com (Randal L. Schwartz) Newsgroups: gmane.emacs.devel Subject: Re: git transition issues Date: Tue, 28 Oct 2014 14:31:03 -0700 Organization: Stonehenge Consulting Services; Portland, Oregon, USA Message-ID: <86h9ynnap4.fsf@red.stonehenge.com> References: <20141027000718.F09B5382A66@snark.thyrsus.com> <544DA310.1090902@porkrind.org> <86r3xrnbcm.fsf@red.stonehenge.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414531910 14571 80.91.229.3 (28 Oct 2014 21:31:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2014 21:31:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 28 22:31:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XjEMi-0003GI-ND for ged-emacs-devel@m.gmane.org; Tue, 28 Oct 2014 22:31:44 +0100 Original-Received: from localhost ([::1]:41511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjEMi-0003MQ-9U for ged-emacs-devel@m.gmane.org; Tue, 28 Oct 2014 17:31:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjEMP-0003MF-V4 for emacs-devel@gnu.org; Tue, 28 Oct 2014 17:31:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjEMI-0006IR-Bt for emacs-devel@gnu.org; Tue, 28 Oct 2014 17:31:25 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjEMI-0006IL-5m for emacs-devel@gnu.org; Tue, 28 Oct 2014 17:31:18 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XjEMC-0002kr-E0 for emacs-devel@gnu.org; Tue, 28 Oct 2014 22:31:12 +0100 Original-Received: from red.stonehenge.com ([208.79.95.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 22:31:12 +0100 Original-Received: from merlyn by red.stonehenge.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 22:31:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: red.stonehenge.com x-mayan-date: Long count = 13.0.1.15.16; tzolkin = 4 Cib; haab = 9 Zac User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Cancel-Lock: sha1:ZuyoamAnmTiNaSkHFCsx50n//lc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175944 Archived-At: >>>>> "Randal" == Randal L Schwartz writes: Randal> Consider instead something like "git describe --tags HEAD", which Randal> generates a fairly short yet meaningful and distinct value regardless of Randal> where HEAD is. That pulls in too many tags. This is closer: git describe --tags --match "EMACS_2*" HEAD which will break when emacs version 30 comes out, but it's good enough for now. For example, for the current origin/emacs-24 commit, that comes out as: EMACS_23_4-22895-g6b5af2d which says we're 22895 commits past EMACS_23_4 in the repo, and the last 8 chars are "g" plus the head of the sha1 (6b5af2d), uniquely identifying the commit. If the head is precisely the tag, the output is just the tag, so for: git describe --tags --match "EMACS_2*" EMACS_23_4 we get EMACS_23_4 I think this has the properties you want, although the first part might require massaging. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix consulting, Technical writing, Comedy, etc. etc. Still trying to think of something clever for the fourth line of this .sig