branch: elpa/magit commit dd14711edf616382d0fd103b09ce590304b0ebd5 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-{branch-unshelve,insert-shelved-branches}: List newest first --- CHANGELOG | 4 ++-- lisp/magit-branch.el | 2 +- lisp/magit-refs.el | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9b51449bd1..71960170e9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,8 +17,8 @@ buffers, and improved existing variants. In Dired, these commands are available from ~magit-file-dispatch~ (~C-c M-g~). 542c2f8a75 et al. -- ~magit-branch-shelve~ now appends the date to the refname, and - ~magit-branch-unshelve~ removes such suffixes. 78ffd1a389 +- ~magit-branch-shelve~ now prepends the date to the refname, and + ~magit-branch-unshelve~ removes such prefixes. 78ffd1a389 - The new function ~magit-insert-shelved-branch~ can be added to ~magit-refs-sections-hook~ to list shelved branches. d6b7784547 diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el index 532b9beace..56a754e571 100644 --- a/lisp/magit-branch.el +++ b/lisp/magit-branch.el @@ -834,7 +834,7 @@ Also rename the respective reflog file." (list (magit-completing-read "Unshelve branch" (mapcar (##substring % 8) - (magit-list-refnames "refs/shelved")) + (nreverse (magit-list-refnames "refs/shelved"))) nil t))) (let ((old (concat "refs/shelved/" branch)) (new (concat "refs/heads/" diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el index 3b07c7897c..024acdc284 100644 --- a/lisp/magit-refs.el +++ b/lisp/magit-refs.el @@ -644,7 +644,7 @@ line is inserted at all." (when-let ((refs (magit-list-refs "refs/shelved/"))) (magit-insert-section (shelved nil) (magit-insert-heading t "Shelved branches") - (dolist (ref refs) + (dolist (ref (nreverse refs)) (magit-insert-section (shelved-branch ref t) (magit-insert-heading " " (magit--propertize-face (substring ref 13) 'magit-refname))