From: Dan Nicolaescu <dann@ics.uci.edu>
To: Karl Chen <quarl@cs.berkeley.edu>
Cc: emacs-devel@gnu.org
Subject: Re: vc-git-show-log-entry
Date: Mon, 20 Oct 2008 11:19:06 -0700 (PDT) [thread overview]
Message-ID: <200810201819.m9KIJ6Wh024634@mothra.ics.uci.edu> (raw)
In-Reply-To: <quack.20081020T0236.lthtzb7ip51@roar.cs.berkeley.edu> (Karl Chen's message of "Mon, 20 Oct 2008 02:36:58 -0700")
Karl Chen <quarl@cs.berkeley.edu> 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.
next prev parent reply other threads:[~2008-10-20 18:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 9:36 vc-git-show-log-entry Karl Chen
2008-10-20 15:01 ` vc-git-show-log-entry Eric Hanchrow
2008-10-20 15:09 ` vc-git-show-log-entry Eric Hanchrow
2008-10-20 18:19 ` Dan Nicolaescu [this message]
2008-10-20 20:20 ` vc-git-show-log-entry Karl Chen
2008-10-20 22:10 ` vc-git-show-log-entry Dan Nicolaescu
2008-10-21 7:23 ` vc-git-show-log-entry Karl Chen
2008-10-21 8:49 ` vc-git-show-log-entry Dan Nicolaescu
2008-10-21 17:52 ` vc-git-show-log-entry Alexandre Julliard
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=200810201819.m9KIJ6Wh024634@mothra.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=quarl@cs.berkeley.edu \
/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.