branch: elpa/magit
commit 155b5364caf3dd317723a1b47f355fe4ef96e5c1
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-branch-reset: Use magit-read-branch-or-commit
---
lisp/magit-branch.el | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index d6962659358..3dc092687b4 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -549,15 +549,12 @@ When resetting to another branch and a prefix argument is
used,
then also set the target branch as the upstream of the branch
that is being reset."
(interactive
- (let* ((atpoint (magit-local-branch-at-point))
- (branch (magit-read-local-branch "Reset branch" atpoint))
- (minibuffer-default-add-function
(magit--minibuf-default-add-commit)))
+ (let ((branch (magit-read-local-branch "Reset branch"
+ (magit-local-branch-at-point))))
(list branch
- (magit-completing-read (format "Reset %s to" branch)
- (delete branch (magit-list-branch-names))
- nil nil nil 'magit-revision-history
- (or (and (not (equal branch atpoint))
atpoint)
- (magit-get-upstream-branch branch)))
+ (magit-read-branch-or-commit (format "Reset %s to" branch)
+ (magit-get-upstream-branch branch)
+ branch)
current-prefix-arg)))
(let ((magit-inhibit-refresh t))
(if (equal branch (magit-get-current-branch))