From: "Chris Moore" <christopher.ian.moore@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: vc-git doesn't select current revision in vc-print-log
Date: Sat, 13 Oct 2007 14:48:43 +0200 [thread overview]
Message-ID: <a9691ee20710130548v22f0efcq31a50b733ddb7227@mail.gmail.com> (raw)
Using "C-x v l" to show a file's revision history is supposed to
select the current version in the log, but for git-controlled files it
leaves point at the end.
This is because (log-view-goto-rev rev) is called with REV bound to a
branch name ("master", or whatever), but log-view-goto-rev can only
match on the SHA1 hashes.
It turns out that the current revision is always the first one in the
list, since vc-print-log lists from the currently selected version
backwards, so adding the following to vc-git.el fixes the problem:
(defun vc-git-show-log-entry (rev)
(goto-char (point-min))
(log-view-msg-next))
I also noticed that reloading vc-git.el isn't enough to get VC to
notice the new function. vc-arch.el has this in it:
;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file.
(put 'Arch 'vc-functions nil)
perhaps vc-git.el would benefit from the same (with 'Git instead of
'Arch, of course).
Chris.
next reply other threads:[~2007-10-13 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-13 12:48 Chris Moore [this message]
2007-10-13 17:29 ` vc-git doesn't select current revision in vc-print-log Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9691ee20710130548v22f0efcq31a50b733ddb7227@mail.gmail.com \
--to=christopher.ian.moore@gmail.com \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.