[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got db89d6f 114/145: add a wrapper for the update co
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got db89d6f 114/145: add a wrapper for the update command |
Date: |
Thu, 9 Sep 2021 15:58:45 -0400 (EDT) |
branch: externals/vc-got
commit db89d6fde605ba589cb2ed0cac89b3eceae8b4e8
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
add a wrapper for the update command
---
vc-got.el | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index 54ff57f..65e4b0f 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -352,6 +352,16 @@ given COMMIT."
(with-temp-buffer
(zerop (vc-got--call "integrate" branch))))
+(defun vc-got--update (branch &optional paths)
+ "Update to a different commit or BRANCH.
+Optionally restrict the update operation to files at or within
+the specified PATHS."
+ (with-temp-buffer
+ (unless (zerop (vc-got--call "update" "-b" branch "--" paths))
+ (error "[vc-got] can't update to branch %s: %s"
+ branch
+ (buffer-string)))))
+
(defun vc-got--diff (&rest args)
"Call got diff with ARGS. The result will be stored in the current buffer."
(let (process-file-side-effects)
@@ -839,11 +849,7 @@ true, NAME should create a new branch otherwise it will
pop-up a
(defun vc-got-retrieve-tag (dir name _update)
"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))
- (error "[vc-got] can't switch to tag %s: %s"
- name
- (buffer-string))))))
+ (vc-got--update name dir)))
;; Miscellaneous
- [elpa] externals/vc-got 2d039a2 089/145: fix vc-dir listing on sub-directories, (continued)
- [elpa] externals/vc-got 2d039a2 089/145: fix vc-dir listing on sub-directories, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 2b7241a 086/145: revamp readme, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 5fb2f47 099/145: implement revision-completion-table, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0a3316a 091/145: implement log-view-mode, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8014bde 101/145: implement half create-tag, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got e9a5df0 098/145: make vc-annotate-show-diff-revision-at-line works, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 567c17a 093/145: vc-got trims '----' by itself now, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 1870c8b 094/145: add a space when prompting for the push/pull operations, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c151c25 095/145: implement vc-got-find-file-hook, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8ec0bb7 107/145: guard vc-got-diff against nil files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got db89d6f 114/145: add a wrapper for the update command,
ELPA Syncer <=
- [elpa] externals/vc-got ae2ad57 123/145: don't need mark-resolved and find-admin-dir, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 09d5937 103/145: implement retrieve-tag and complete the tag system!, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got e104d04 122/145: update the year, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d3ca33b 116/145: add the required "headers" for a package, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 1d573c9 119/145: rename arguments to emphasize that they must be files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 61b9a83 124/145: add the keyword `tools', like in vc-git, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 00eb9c8 127/145: add `lint' target, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 95a78ec 134/145: missing require and split setq-locals, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 4b3c0c6 132/145: add Timo as author, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 3ec8a8b 130/145: chores, ELPA Syncer, 2021/09/09