* lisp/vc-git.el (vc-git-annotate-extract-revision-at-line): Remove
trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481)
+2010-06-21 Dan Nicolaescu <dann@ics.uci.edu>
+
+ Fix reading file names in Git annotate buffers.
+ * vc-git.el (vc-git-annotate-extract-revision-at-line): Remove
+ trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481)
+
2010-06-20 Alan Mackenzie <acm@muc.de>
* progmodes/cc-mode.el (c-before-hack-hook): When the mode is set
(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)
- (vc-git-root default-directory)))
+ (let ((fname (match-string-no-properties 3)))
+ ;; Remove trailing whitespace from the file name.
+ (when (string-match " +\\'" fname)
+ (setq fname (substring fname 0 (match-beginning 0))))
+ (cons revision
+ (expand-file-name fname (vc-git-root default-directory))))
revision)))))
;;; TAG SYSTEM