emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git transition issues


From: Eric S. Raymond
Subject: Re: git transition issues
Date: Sun, 26 Oct 2014 21:55:58 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

David Caldwell <address@hidden>:
> On 10/26/14 5:07 PM, address@hidden (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?
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]