all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5657: `vc-git-annotate-extract-revision-at-line' returns incorrect pathname
@ 2010-02-28 14:57 Štěpán Němec
       [not found] ` <87hbosxli2.fsf@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Štěpán Němec @ 2010-02-28 14:57 UTC (permalink / raw
  To: 5657

Hello,

I spotted this when running `vc-annotate-show-diff-revision-at-line', which
called the above-mentioned fuction in this case.

Incorrect path is returned when not called from the repository root, because
the value of `default-directory' (used by `expand-file-name') will be
different (i.e. the current directory deeper in the tree, instead of the
root dir).

The patch below (based on the latest Git master) fixes it.

Regards,

 Štěpán Němec

       
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -668,7 +668,9 @@ or BRANCH^ (where \"^\" can be repeated)."
    (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?")
      (let ((revision (match-string-no-properties 1)))
	(if (match-beginning 2)
-	  (cons revision (expand-file-name (match-string-no-properties 3)))
+	  (cons revision (expand-file-name
+                          (match-string-no-properties 3)
+                          (vc-git-root default-directory)))
	  revision)))))

;;; TAG SYSTEM







^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#5657:
       [not found] ` <87hbosxli2.fsf@gmail.com>
@ 2010-03-07 14:46   ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-03-07 14:46 UTC (permalink / raw
  To: stepnem; +Cc: 5657

stepnem@gmail.com "(Štěpán Němec)" writes:

> PING
> [Any reason not to act on this?]

I've just checked it in.  Thanks.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-07 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-28 14:57 bug#5657: `vc-git-annotate-extract-revision-at-line' returns incorrect pathname Štěpán Němec
     [not found] ` <87hbosxli2.fsf@gmail.com>
2010-03-07 14:46   ` bug#5657: Chong Yidong

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.