]> git.eshelyaron.com Git - emacs.git/commitdiff
vc-git.el (vc-git-print-log): Fix previous change.
authorDan Nicolaescu <dann@ics.uci.edu>
Tue, 24 Jul 2007 22:21:46 +0000 (22:21 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Tue, 24 Jul 2007 22:21:46 +0000 (22:21 +0000)
lisp/ChangeLog
lisp/vc-git.el

index c4c089d476a182bfc967bc075e87999e73c8f7aa..405b5a50dbfda5d6f4ee743947330c05dfbc89c6 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-24  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc-git.el (vc-git-print-log): Fix previous change.
+
 2007-07-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * window.el (save-selected-window): Minor optimization.
index 39c86f672fbb94e107b36d34be8950af9768c613..43cddbc3cf217fe67b8da1e5f51340fc4d8c2124 100644 (file)
 
 (defun vc-git-print-log (files &optional buffer)
   "Get change log associated with FILES."
-  (let ((name (file-relative-name file))
-        (coding-system-for-read git-commits-coding-system))
-    ;; `log-view-mode' needs to have the file name in order to function
-    ;; correctly. "git log" does not print it, so we insert it here by
-    ;; hand.
-
+  (let ((coding-system-for-read git-commits-coding-system))
     ;; `vc-do-command' creates the buffer, but we need it before running
     ;; the command.
     (vc-setup-buffer buffer)
     ;; If the buffer exists from a previous invocation it might be
     ;; read-only.
     (let ((inhibit-read-only t))
-      ;; XXX Here loop and call "git rev-list" on each file separately
-      ;; to make sure that each file gets a "File:" header before the
-      ;; corresponding log. Maybe there is a way to do this with one
-      ;; command...
-    (dolist (file files)
-      (with-current-buffer
-        buffer
-        (insert "File: " (file-name-nondirectory file) "\n")))
-    (vc-git-command buffer 'async name "rev-list" "--pretty" "HEAD" "--"))))
+      ;; XXX `log-view-mode' needs to have something to identify where
+      ;; the log for each individual file starts. It seems that by
+      ;; default git does not output this info. So loop here and call
+      ;; "git rev-list" on each file separately to make sure that each
+      ;; file gets a "File:" header before the corresponding
+      ;; log. Maybe there is a way to do this with one command...
+      (dolist (file files)
+       (with-current-buffer
+           buffer
+         (insert "File: " (file-name-nondirectory file) "\n"))
+       (vc-git-command buffer 'async (file-relative-name file) 
+                       "rev-list" "--pretty" "HEAD" "--")))))
 
 (defvar log-view-message-re)
 (defvar log-view-file-re)