diff options
| author | Dan Nicolaescu | 2010-06-21 13:03:30 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-06-21 13:03:30 -0700 |
| commit | c036381c22255c48bf71cc2f58bb1f061a801523 (patch) | |
| tree | 636b85ccfd9b9a3f748a8e9e15cdcc6a6c60504a | |
| parent | 0fc76035edd207f6c87b4802bce9fa16d9c857d2 (diff) | |
| download | emacs-c036381c22255c48bf71cc2f58bb1f061a801523.tar.gz emacs-c036381c22255c48bf71cc2f58bb1f061a801523.zip | |
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)
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/vc-git.el | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 47763f3c705..9cb50c3e98a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-06-21 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Fix reading file names in Git annotate buffers. | ||
| 4 | * vc-git.el (vc-git-annotate-extract-revision-at-line): Remove | ||
| 5 | trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) | ||
| 6 | |||
| 1 | 2010-06-20 Alan Mackenzie <acm@muc.de> | 7 | 2010-06-20 Alan Mackenzie <acm@muc.de> |
| 2 | 8 | ||
| 3 | * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set | 9 | * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set |
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index dec54796c5b..058929632e9 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el | |||
| @@ -706,8 +706,12 @@ or BRANCH^ (where \"^\" can be repeated)." | |||
| 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 |