Mercurial > emacs
comparison lisp/vc-git.el @ 109251:e60e30383efd
Fix reading file names in Git annotate buffers.
* lisp/vc-git.el (vc-git-annotate-extract-revision-at-line): Remove
trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481)
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 21 Jun 2010 13:03:30 -0700 |
parents | 09b4b2c3944d |
children | 5f75bdff36e4 |
comparison
equal
deleted
inserted
replaced
109250:d3b4a3311253 | 109251:e60e30383efd |
---|---|
704 (save-excursion | 704 (save-excursion |
705 (move-beginning-of-line 1) | 705 (move-beginning-of-line 1) |
706 (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?") | 706 (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?") |
707 (let ((revision (match-string-no-properties 1))) | 707 (let ((revision (match-string-no-properties 1))) |
708 (if (match-beginning 2) | 708 (if (match-beginning 2) |
709 (cons revision (expand-file-name (match-string-no-properties 3) | 709 (let ((fname (match-string-no-properties 3))) |
710 (vc-git-root default-directory))) | 710 ;; Remove trailing whitespace from the file name. |
711 (when (string-match " +\\'" fname) | |
712 (setq fname (substring fname 0 (match-beginning 0)))) | |
713 (cons revision | |
714 (expand-file-name fname (vc-git-root default-directory)))) | |
711 revision))))) | 715 revision))))) |
712 | 716 |
713 ;;; TAG SYSTEM | 717 ;;; TAG SYSTEM |
714 | 718 |
715 (defun vc-git-create-tag (dir name branchp) | 719 (defun vc-git-create-tag (dir name branchp) |