summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Myyrä <timo.myyra@bittivirhe.fi>2025-01-05 14:03:06 +0200
committerOmar Polo <op@omarpolo.com>2025-02-23 15:38:04 +0100
commit1c46988ea9e81a57a4c9569a0fee19108f861d08 (patch)
tree897de38cb272072bee4488d52219ed11d00e8fdf
parenteb3f662166c66e9200240a80f24abfdd141830d9 (diff)
use shorter way to poll branch from user in vc-got-merge-branchexternals/vc-got
-rwxr-xr-xvc-got.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/vc-got.el b/vc-got.el
index 68a9899..254c628 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -632,11 +632,9 @@ If REV is t, checkout from the head."
(defun vc-got-merge-branch ()
"Prompt for a branch and integrate it into the current one."
;; XXX: be smart and try to "got rebase" if "got integrate" fails?
- (let* ((branches (cl-loop for (branch . commit) in (vc-got--list-branches)
- collect branch))
- (branch (completing-read "Merge from branch: " branches)))
- (when branch
- (vc-got--integrate branch))))
+ (when-let ((branch (completing-read "Merge from branch: "
+ (mapcar #'car (vc-got--list-branches)))))
+ (vc-got--integrate branch)))
(defun vc-got--proc-filter (proc s)
"Custom output filter for async process PROC.