# HG changeset patch # User Dan Nicolaescu # Date 1185588103 0 # Node ID a324837355ecd0c314ea75d07377bffe8210bb19 # Parent 78ee45af2b61e0db599bd006bf7a8721959802f2 (vc-git-print-log): Support both the old single file interface and the new one. diff -r 78ee45af2b61 -r a324837355ec lisp/ChangeLog --- a/lisp/ChangeLog Sat Jul 28 01:24:33 2007 +0000 +++ b/lisp/ChangeLog Sat Jul 28 02:01:43 2007 +0000 @@ -1,3 +1,8 @@ +2007-07-28 Dan Nicolaescu + + * vc-git.el (vc-git-print-log): Support both the old single file + interface and the new one. + 2007-07-28 Nick Roberts * bindings.el (mode-line-remote): Use updated %@ construct. diff -r 78ee45af2b61 -r a324837355ec lisp/vc-git.el --- a/lisp/vc-git.el Sat Jul 28 01:24:33 2007 +0000 +++ b/lisp/vc-git.el Sat Jul 28 02:01:43 2007 +0000 @@ -260,7 +260,10 @@ (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) @@ -273,7 +276,7 @@ ;; "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"))