From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric S. Raymond" Newsgroups: gmane.emacs.devel Subject: Re: git transition issues Date: Sun, 26 Oct 2014 21:55:58 -0400 Organization: Eric Conspiracy Secret Labs Message-ID: <20141027015558.GA10920@thyrsus.com> References: <20141027000718.F09B5382A66@snark.thyrsus.com> <544DA310.1090902@porkrind.org> Reply-To: esr@thyrsus.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1414375015 32707 80.91.229.3 (27 Oct 2014 01:56:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2014 01:56:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Caldwell Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 27 02:56:49 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 1XiZY9-0002U9-F9 for ged-emacs-devel@m.gmane.org; Mon, 27 Oct 2014 02:56:49 +0100 Original-Received: from localhost ([::1]:58898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiZY8-00063r-VW for ged-emacs-devel@m.gmane.org; Sun, 26 Oct 2014 21:56:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiZXt-00063S-IK for emacs-devel@gnu.org; Sun, 26 Oct 2014 21:56:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiZXp-00073r-9t for emacs-devel@gnu.org; Sun, 26 Oct 2014 21:56:33 -0400 Original-Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:35206 helo=snark.thyrsus.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiZXp-00073k-5U for emacs-devel@gnu.org; Sun, 26 Oct 2014 21:56:29 -0400 Original-Received: by snark.thyrsus.com (Postfix, from userid 1000) id A59CC382BD6; Sun, 26 Oct 2014 21:55:58 -0400 (EDT) Content-Disposition: inline In-Reply-To: <544DA310.1090902@porkrind.org> X-Eric-Conspiracy: There is no conspiracy User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 71.162.243.5 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:175885 Archived-At: David Caldwell : > On 10/26/14 5:07 PM, esr@thyrsus.com (Eric S. Raymond) wrote: > > > lisp/version.el: The bzr-specific code for version extraction will be > > obsolete. The git-specific code is very broken. Among other > > problems, in my stock Ubuntu environment the git log command it > > generates always fails, apparently because it can't find terminal > > capabilities it wants. > > From version.el: > (call-process "git" nil '(t nil) nil "log" > "-1" "--pretty=format:%N") > > This looks wrong to me. %N is the commit's note from "git notes". > Perhaps this should be %H, to get the commit hash? And if so, I think > the better way is with "git show-ref", as it's a plumbing command where > "git log" is not (git log likes to redirect stuff through your $PAGER, etc). > > git show-ref -s --head ^HEAD I noticed the %N issue, yes. I agree with this critique. Consider this change, part of my transition-day patch: +# Ideally, VCSWITNESS should be a file that is modified whenever the +# repository registers a commit from either a local checkin or a +# repository pull. In git there is no single file that guarantees +# this, but the local log for the current head should be close enough. +# # Note the use of single quotes in the value of vcswitness. # This passes an unexpanded $srcdir to src's Makefile, which then # expands it using its own value of srcdir (which points to the # source directory of src/). src: Makefile - dirstate='.bzr/checkout/dirstate'; \ + dirstate='.git/logs/HEAD'; \ vcswitness='$$(srcdir)/../'$$dirstate; \ [ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \ $(MAKE) -C $@ all VCSWITNESS="$$vcswitness" Can you think of a better witness value? -- Eric S. Raymond