diff options
| author | Dan Nicolaescu | 2007-07-24 22:21:46 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2007-07-24 22:21:46 +0000 |
| commit | 64e3efd9bced55ceede61a6536f8b33b7be69bd5 (patch) | |
| tree | 558a2b28aaeec46f142a6457613b65a8c3e749c3 | |
| parent | 62e3c31fab628e238627055d30531f19f278be40 (diff) | |
| download | emacs-64e3efd9bced55ceede61a6536f8b33b7be69bd5.tar.gz emacs-64e3efd9bced55ceede61a6536f8b33b7be69bd5.zip | |
vc-git.el (vc-git-print-log): Fix previous change.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/vc-git.el | 28 |
2 files changed, 17 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c4c089d476a..405b5a50dbf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-07-24 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * vc-git.el (vc-git-print-log): Fix previous change. | ||
| 4 | |||
| 1 | 2007-07-24 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2007-07-24 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * window.el (save-selected-window): Minor optimization. | 7 | * window.el (save-selected-window): Minor optimization. |
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 39c86f672fb..43cddbc3cf2 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el | |||
| @@ -264,27 +264,25 @@ | |||
| 264 | 264 | ||
| 265 | (defun vc-git-print-log (files &optional buffer) | 265 | (defun vc-git-print-log (files &optional buffer) |
| 266 | "Get change log associated with FILES." | 266 | "Get change log associated with FILES." |
| 267 | (let ((name (file-relative-name file)) | 267 | (let ((coding-system-for-read git-commits-coding-system)) |
| 268 | (coding-system-for-read git-commits-coding-system)) | ||
| 269 | ;; `log-view-mode' needs to have the file name in order to function | ||
| 270 | ;; correctly. "git log" does not print it, so we insert it here by | ||
| 271 | ;; hand. | ||
| 272 | |||
| 273 | ;; `vc-do-command' creates the buffer, but we need it before running | 268 | ;; `vc-do-command' creates the buffer, but we need it before running |
| 274 | ;; the command. | 269 | ;; the command. |
| 275 | (vc-setup-buffer buffer) | 270 | (vc-setup-buffer buffer) |
| 276 | ;; If the buffer exists from a previous invocation it might be | 271 | ;; If the buffer exists from a previous invocation it might be |
| 277 | ;; read-only. | 272 | ;; read-only. |
| 278 | (let ((inhibit-read-only t)) | 273 | (let ((inhibit-read-only t)) |
| 279 | ;; XXX Here loop and call "git rev-list" on each file separately | 274 | ;; XXX `log-view-mode' needs to have something to identify where |
| 280 | ;; to make sure that each file gets a "File:" header before the | 275 | ;; the log for each individual file starts. It seems that by |
| 281 | ;; corresponding log. Maybe there is a way to do this with one | 276 | ;; default git does not output this info. So loop here and call |
| 282 | ;; command... | 277 | ;; "git rev-list" on each file separately to make sure that each |
| 283 | (dolist (file files) | 278 | ;; file gets a "File:" header before the corresponding |
| 284 | (with-current-buffer | 279 | ;; log. Maybe there is a way to do this with one command... |
| 285 | buffer | 280 | (dolist (file files) |
| 286 | (insert "File: " (file-name-nondirectory file) "\n"))) | 281 | (with-current-buffer |
| 287 | (vc-git-command buffer 'async name "rev-list" "--pretty" "HEAD" "--")))) | 282 | buffer |
| 283 | (insert "File: " (file-name-nondirectory file) "\n")) | ||
| 284 | (vc-git-command buffer 'async (file-relative-name file) | ||
| 285 | "rev-list" "--pretty" "HEAD" "--"))))) | ||
| 288 | 286 | ||
| 289 | (defvar log-view-message-re) | 287 | (defvar log-view-message-re) |
| 290 | (defvar log-view-file-re) | 288 | (defvar log-view-file-re) |