]> code.delx.au - gnu-emacs/commitdiff
vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument list
authorEric S. Raymond <esr@thyrsus.com>
Tue, 9 Dec 2014 11:55:54 +0000 (06:55 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 9 Dec 2014 11:59:34 +0000 (06:59 -0500)
* vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument list,
avoids problems witth names containing hyphens.

lisp/ChangeLog
lisp/vc/vc-src.el

index 81afe8a5cccd0de84ade17990a6ba5a8346e8393..bf139d6e445278d5f619087be961ae07c3b430f3 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-09  Eric S. Raymond  <esr@snark.thyrsus.com>
+
+       * vc/vc-src.el (vc-src-do-comand): Prepend -- to file argument
+       list, avoids problems witth names containing hyphens.
+
 2014-12-09  Wilson Snyder  <wsnyder@wsnyder.org>
 
        Sync with upstream verilog-mode revision aa4b777.
index 3186d7254cbf5ae81844cff6599a90106ae6822b..36d6a20f9b16cf969082ba692db6abe3ab36aa40 100644 (file)
@@ -193,7 +193,12 @@ For a description of possible values, see `vc-check-master-templates'."
 (defun vc-src-command (buffer file-or-list &rest flags)
   "A wrapper around `vc-do-command' for use in vc-src.el.
 This function differs from vc-do-command in that it invokes `vc-src-program'."
-  (apply 'vc-do-command (or buffer "*vc*") 0 vc-src-program file-or-list flags))
+  (let (file-list)
+    (cond ((stringp file-or-list)
+          (setq file-list (list "--" file-or-list)))
+         (file-or-list
+          (setq file-list (cons "--" file-or-list))))
+    (apply 'vc-do-command (or buffer "*vc*") 0 vc-src-program file-list flags)))
 
 (defun vc-src-working-revision (file)
   "SRC-specific version of `vc-working-revision'."