[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5657: `vc-git-annotate-extract-revision-at-line' returns incorrect p
From: |
Štěpán Němec |
Subject: |
bug#5657: `vc-git-annotate-extract-revision-at-line' returns incorrect pathname |
Date: |
Sun, 28 Feb 2010 15:57:58 +0100 |
User-agent: |
Mutt/1.5.20 (2009-08-27) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#5657: `vc-git-annotate-extract-revision-at-line' returns incorrect pathname,
Štěpán Němec <=