From: Dan Nicolaescu Date: Sat, 28 Jul 2007 02:01:43 +0000 (+0000) Subject: (vc-git-print-log): Support both the old single file X-Git-Tag: emacs-pretest-23.0.90~11667 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0709d8dc9d60d2fb2ec71457085f6f8d1079614;p=emacs.git (vc-git-print-log): Support both the old single file interface and the new one. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc48a350dec..8d67655c579 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/vc-git.el b/lisp/vc-git.el index 7e358ed0238..e4a9d26105a 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el @@ -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"))