[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got c3185bf 113/145: add various -- to avoid argumen
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got c3185bf 113/145: add various -- to avoid arguments being interpreted as flags |
Date: |
Thu, 9 Sep 2021 15:58:44 -0400 (EDT) |
branch: externals/vc-got
commit c3185bf708050fc668a36aee33e4bf053a34ed82
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
add various -- to avoid arguments being interpreted as flags
---
vc-got.el | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index 182a0f8..54ff57f 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -188,7 +188,7 @@ The output will be placed in the current buffer."
(defun vc-got--add (files)
"Add FILES to got, passing `vc-register-switches' to the command invocation."
(with-temp-buffer
- (vc-got--call "add" vc-register-switches files)))
+ (vc-got--call "add" vc-register-switches "--" files)))
(defun vc-got--log (&optional path limit start-commit stop-commit
search-pattern reverse)
@@ -212,6 +212,7 @@ worktree."
(when stop-commit (list "-x" stop-commit))
(when search-pattern (list "-s" search-pattern))
(when reverse '("-R"))
+ "--"
path)))
(save-excursion
(delete-matching-lines
"^-----------------------------------------------$")
@@ -234,6 +235,7 @@ files)."
(process-file-side-effects))
(when (zerop (vc-got--call "status"
(when status-codes (list "-s" status-codes))
+ "--"
(or files dir-or-file)))
(goto-char (point-min))
(cl-loop until (eobp)
@@ -299,7 +301,7 @@ given COMMIT."
(vc-got-with-worktree path
(let (process-file-side-effects)
(with-temp-buffer
- (when (zerop (vc-got--call "tree" "-c" commit "-i" path))
+ (when (zerop (vc-got--call "tree" "-c" commit "-i" "--" path))
(vc-got--tree-parse))))))
(defun vc-got--cat (commit obj-id)
@@ -311,7 +313,7 @@ given COMMIT."
"Execute got revert FILES."
(vc-got-with-worktree (car files)
(with-temp-buffer
- (zerop (vc-got--call "revert" files)))))
+ (zerop (vc-got--call "revert" "--" files)))))
(defun vc-got--list-branches ()
"Return an alist of (branch . commit)."
@@ -355,13 +357,14 @@ given COMMIT."
(let (process-file-side-effects)
(zerop (vc-got--call "diff"
(vc-switches 'got 'diff)
+ "--"
(mapcar #'file-relative-name args)))))
(defun vc-got--unstage (file-or-directory)
"Unstage all the staged hunks at or within FILE-OR-DIRECTORY.
If it's nil, unstage every staged changes across the entire work
tree."
- (zerop (vc-got--call "unstage" file-or-directory)))
+ (zerop (vc-got--call "unstage" "--" file-or-directory)))
(defun vc-got--remove (file &optional force keep-local)
"Use got to remove FILE.
@@ -373,6 +376,7 @@ files on disk."
(zerop (vc-got--call "remove"
(when force "-f")
(when keep-local "-k")
+ "--"
file)))))
(defun vc-got--ref ()
@@ -395,7 +399,7 @@ files on disk."
(let (process-file-side-effects)
(vc-got-with-worktree default-directory
(with-temp-buffer
- (if (zerop (vc-got--call "branch" name))
+ (if (zerop (vc-got--call "branch" "--" name))
t
(error "[vc-got] can't create branch %s: %s" name
(buffer-string)))))))
@@ -436,7 +440,7 @@ files on disk."
;; Manually calling got status and checking the result inline to
;; avoid building the data structure in vc-got--status.
(with-temp-buffer
- (when (zerop (vc-got--call "status" file))
+ (when (zerop (vc-got--call "status" "--" file))
(goto-char (point-min))
(if (eobp)
'up-to-date
@@ -579,6 +583,7 @@ FILES is nil, consider all the files in DIR."
(with-temp-buffer
(unless (zerop (vc-got--call "commit" "-m"
(log-edit-extract-headers nil comment)
+ "--"
files))
(error "[vc-got] can't commit: %s" (buffer-string)))))
@@ -759,6 +764,7 @@ revisions''; instead, like with git, you have tags and
branches."
(set (make-local-variable 'vc-parent-buffer) (find-file-noselect file))
(vc-got--call "blame"
(when rev (list "-c" rev))
+ "--"
file))))
(defconst vc-got--annotate-re
@@ -808,7 +814,7 @@ Creates the TAG using the content of the current buffer."
(let ((msg (buffer-substring-no-properties (point-min)
(point-max))))
(with-temp-buffer
- (unless (zerop (vc-got--call "tag" "-m" msg tag))
+ (unless (zerop (vc-got--call "tag" "-m" msg "--" tag))
(error "[vc-got] can't create tag %s: %s" tag (buffer-string))))))
(defun vc-got-create-tag (_dir name branchp)
@@ -834,7 +840,7 @@ true, NAME should create a new branch otherwise it will
pop-up a
"Switch to the tag NAME for files at or below DIR."
(let ((default-directory dir))
(with-temp-buffer
- (unless (zerop (vc-got--call "update" "-b" name dir))
+ (unless (zerop (vc-got--call "update" "-b" name "--" dir))
(error "[vc-got] can't switch to tag %s: %s"
name
(buffer-string))))))
- [elpa] externals/vc-got 7726b6c 097/145: silence some checkdoc warnings, (continued)
- [elpa] externals/vc-got 7726b6c 097/145: silence some checkdoc warnings, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f701269 118/145: require log-edit to avoid a warning, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 241a3b1 111/145: implement unregister, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0071376 125/145: change the description in the header, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 622993f 117/145: remove vc-got-stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 49945a0 105/145: mark ignore and ignore-completion-table as NOT NEEDED, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 807ca5a 120/145: mark completely staged files as 'up-to-date, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 9114bbc 112/145: use wrapper function instead of replicating it, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 01bf4e0 128/145: reword docstring to avoid checkdoc complain, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 65255dc 133/145: update README.md, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c3185bf 113/145: add various -- to avoid arguments being interpreted as flags,
ELPA Syncer <=
- [elpa] externals/vc-got 8b45e61 137/145: mention version requirement for got send, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d06f988 019/145: suggest to add .got to vc-directory-exclusion-list, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got ba12390 027/145: adding vc-got-stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 21914ca 032/145: apply-impl should not be interactive, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0a66694 046/145: vc-got--log: add flag for reverse and mark as no side effects, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got a5c1731 047/145: drop vc-got-stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8da4c01 049/145: remove debugging comments, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 3f25d9f 051/145: add vc-got-annotate (#4), ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8228942 050/145: fix vc-got-dir-status-files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got fab791a 052/145: vc-got--call flatten and filter arg list, ELPA Syncer, 2021/09/09