emacs-devel
[Top][All Lists]
Advanced

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

Re: vc-git-show-log-entry


From: Dan Nicolaescu
Subject: Re: vc-git-show-log-entry
Date: Mon, 20 Oct 2008 11:19:06 -0700 (PDT)

Karl Chen <address@hidden> writes:

  > Hi,
  > 
  > In Emacs 22.2.1, visiting a git-versioned file, when I do
  > `vc-print-log', point always moves to the end of the buffer
  > instead of the beginning.  This worked for me:
  >     
  >     (defun vc-git-rev-parse (commit)
  >       "Translate COMMIT string into full SHA1 object name.
  >     Returns nil if not possible."
  >       (and commit
  >            (with-temp-buffer
  >              (and
  >               (zerop
  >                (call-process "git" nil '(t nil) nil "rev-parse"
  >                              "--verify"
  >                              commit))
  >               (goto-char (point-min))
  >               (= (forward-line 2) 1)
  >               (bolp)
  >               (buffer-substring-no-properties (point-min) (1- 
(point-max)))))))
  >     
  >     (defun vc-git-show-log-entry (rev)
  >       (log-view-goto-rev (vc-git-rev-parse rev)))      
  > 
  > I looked at CVS HEAD and noticed a new vc-git-show-log-entry and
  > some recent modifications.  I believe the vc-git.el:1.72 version
  > would do the right thing for my use case, but I suspect the r1.73
  > change:
  >     * vc-git.el (vc-git-show-log-entry): Include the revision in
  >       the search string.
  > breaks it.  It looks like that function was supposed to parse
  > things like "HEAD~5", "HEAD^^" into a search repeat count, but the
  > 1.73 change changed the intention of the search.
  > 
  > Personally, I like the vc-git-rev-parse solution better.  It
  > handles every method of specifying commits, the "git way".
  > 
  > vc-git-rev-parse can be refactored with vc-git-symbolic-commit, on
  > which it's based.

It's hard to say what problem you are trying to report.

Can you please try again with a step by step description of what you are
doing, what are the results you are getting and what are the expected
results. Please start from
emacs -Q
Please use emacs from CVS HEAD.  It's unlikely that another release will
be made from the 22.x branch.




reply via email to

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