diff options
| author | Stefan Monnier | 2007-10-20 01:09:59 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-20 01:09:59 +0000 |
| commit | 9f11ce4ec359555a7bf6f26479c6a9a2f2aa9afe (patch) | |
| tree | bdd6149fd5cb7ab4616578273eb349fafbd99632 | |
| parent | 32c58c4725a8091b8d11366db914686d4e7a59b7 (diff) | |
| download | emacs-9f11ce4ec359555a7bf6f26479c6a9a2f2aa9afe.tar.gz emacs-9f11ce4ec359555a7bf6f26479c6a9a2f2aa9afe.zip | |
(vc-git-revision-completion-table, vc-git-revision-table):
Make it work when the arg is a list of files.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/vc-git.el | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d028f56cf55..eb6859e2fe7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | 2007-10-20 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-10-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * vc-git.el (vc-git-revision-completion-table, vc-git-revision-table): | ||
| 3 | * vc-cvs.el (vc-cvs-revision-completion-table): | 4 | * vc-cvs.el (vc-cvs-revision-completion-table): |
| 4 | * vc-arch.el (vc-arch-revision-completion-table): Make it work when the | 5 | * vc-arch.el (vc-arch-revision-completion-table): Make it work when the |
| 5 | arg is a list of files. | 6 | arg is a list of files. |
diff --git a/lisp/vc-git.el b/lisp/vc-git.el index 4bf6506dcb1..d98afa3de17 100644 --- a/lisp/vc-git.el +++ b/lisp/vc-git.el | |||
| @@ -319,7 +319,8 @@ | |||
| 319 | (vc-git-command buf 1 files "diff-tree" "--exit-code" "-p" rev1 rev2 "--") | 319 | (vc-git-command buf 1 files "diff-tree" "--exit-code" "-p" rev1 rev2 "--") |
| 320 | (vc-git-command buf 1 files "diff-index" "--exit-code" "-p" (or rev1 "HEAD") "--")))) | 320 | (vc-git-command buf 1 files "diff-index" "--exit-code" "-p" (or rev1 "HEAD") "--")))) |
| 321 | 321 | ||
| 322 | (defun vc-git-revision-table (file) | 322 | (defun vc-git-revision-table (files) |
| 323 | ;; What about `files'?!? --Stef | ||
| 323 | (let ((table (list "HEAD"))) | 324 | (let ((table (list "HEAD"))) |
| 324 | (with-temp-buffer | 325 | (with-temp-buffer |
| 325 | (vc-git-command t nil nil "for-each-ref" "--format=%(refname)") | 326 | (vc-git-command t nil nil "for-each-ref" "--format=%(refname)") |
| @@ -328,11 +329,11 @@ | |||
| 328 | (push (match-string 2) table))) | 329 | (push (match-string 2) table))) |
| 329 | table)) | 330 | table)) |
| 330 | 331 | ||
| 331 | (defun vc-git-revision-completion-table (file) | 332 | (defun vc-git-revision-completion-table (files) |
| 332 | (lexical-let ((file file) | 333 | (lexical-let ((files files) |
| 333 | table) | 334 | table) |
| 334 | (setq table (lazy-completion-table | 335 | (setq table (lazy-completion-table |
| 335 | table (lambda () (vc-git-revision-table file)))) | 336 | table (lambda () (vc-git-revision-table files)))) |
| 336 | table)) | 337 | table)) |
| 337 | 338 | ||
| 338 | (defun vc-git-diff-tree (dir &optional rev1 rev2) | 339 | (defun vc-git-diff-tree (dir &optional rev1 rev2) |