]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-git-print-log): Support both the old single file
authorDan Nicolaescu <dann@ics.uci.edu>
Sat, 28 Jul 2007 02:01:43 +0000 (02:01 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Sat, 28 Jul 2007 02:01:43 +0000 (02:01 +0000)
interface and the new one.

lisp/ChangeLog
lisp/vc-git.el

index cc48a350decedee6fdc66963ae6de2a233184bcb..8d67655c5795df6932cb2865398aa0393127b52b 100644 (file)
@@ -1,3 +1,8 @@
+2007-07-28  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc-git.el (vc-git-print-log): Support both the old single file
+       interface and the new one.
+
 2007-07-28  Nick Roberts  <nickrob@snap.net.nz>
 
        * bindings.el (mode-line-remote): Use updated %@ construct.
index 7e358ed023884cd2fd4d0431de8019b31837e9fd..e4a9d26105a687712ac0e5b501d4d23b038f43b8 100644 (file)
 
 (defun vc-git-print-log (files &optional buffer)
   "Get change log associated with FILES."
-  (let ((coding-system-for-read git-commits-coding-system))
+  (let ((coding-system-for-read git-commits-coding-system)
+       ;; Support both the old print-log interface that passes a
+       ;; single file, and the new one that passes a file list.
+       (flist (if (listp files) files (list files))))
     ;; `vc-do-command' creates the buffer, but we need it before running
     ;; the command.
     (vc-setup-buffer buffer)
       ;; "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)
+      (dolist (file flist)
        (with-current-buffer
            buffer
          (insert "File: " (file-name-nondirectory file) "\n"))