diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-09-22 16:47:37 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-09-22 16:47:37 +0200 |
| commit | 2d1c55295bb0f94ce68ff42eef78def9be96d484 (patch) | |
| tree | 05c8e356bc483a9780aeeffc11b5d79afbecf4dc /lisp/magit-git.el | |
| parent | fb5988d9d65de00a95542b772f36600b9f8e5b85 (diff) | |
magit-read-shelved-branch: New function
Diffstat (limited to 'lisp/magit-git.el')
| -rw-r--r-- | lisp/magit-git.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el index 7e62da8..b1679c5 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -2851,6 +2851,15 @@ out. Only existing branches can be selected." (string-match "^\\([^ ]+\\) \\(.+\\)" choice) (substring-no-properties (match-str 1 choice))))) +(defun magit-read-shelved-branch (prompt) + (magit-completing-read + prompt + (mapcar (##substring % 8) + (nreverse (magit-list-refnames "refs/shelved"))) + nil t nil nil + (and$ (magit-section-value-if 'shelved-branch) + (substring $ 13)))) + (defun magit-read-remote (prompt &optional default use-only) (let ((remotes (magit-list-remotes))) (if (and use-only (length= remotes 1)) |
