branch: elpa/magit
commit 96192521703420460020ec9a0470a3f9335b6530
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-tag-create: No longer use magit-read-tag
    
    This allows dropping the REQUIRE-MATCH argument from `magit-read-tag',
    because now all its callers do require a match (though some failed to
    specify so).
    
    Keep using completing read when creating a new tag and offer the
    existing tags as "choices".  The idea is that makes it easier to
    see what tags already exist and pick another name for the new one.
---
 lisp/magit-bundle.el | 2 +-
 lisp/magit-git.el    | 6 +++---
 lisp/magit-tag.el    | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/magit-bundle.el b/lisp/magit-bundle.el
index 6e0ae812fc1..7f44d247bc6 100644
--- a/lisp/magit-bundle.el
+++ b/lisp/magit-bundle.el
@@ -99,7 +99,7 @@
 ;;;###autoload
 (defun magit-bundle-update-tracked (tag)
   "Update a bundle that is being tracked using TAG."
-  (interactive (list (magit-read-tag "Update bundle tracked by tag" t)))
+  (interactive (list (magit-read-tag "Update bundle tracked by tag")))
   (let (msg)
     (let-alist (magit--with-temp-process-buffer
                  (save-excursion
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 92290c87c76..aa9999ae149 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2841,9 +2841,9 @@ out.  Only existing branches can be selected."
       (magit-stash-at-point)
       (magit-get-current-branch)))
 
-(defun magit-read-tag (prompt &optional require-match)
-  (magit-completing-read prompt (magit-list-tags) nil
-                         require-match nil 'magit-revision-history
+(defun magit-read-tag (prompt)
+  (magit-completing-read prompt (magit-list-tags) nil t nil
+                         'magit-revision-history
                          (magit-tag-at-point)))
 
 (defun magit-read-stash (prompt)
diff --git a/lisp/magit-tag.el b/lisp/magit-tag.el
index a6966868bf0..d7e1800fd4d 100644
--- a/lisp/magit-tag.el
+++ b/lisp/magit-tag.el
@@ -66,7 +66,7 @@
   "Create a new tag with the given NAME at COMMIT.
 With a prefix argument annotate the tag.
 \n(git tag [--annotate] NAME REV)"
-  (interactive (list (magit-read-tag "Tag name")
+  (interactive (list (magit-completing-read "Create tag" (magit-list-tags))
                      (magit-read-branch-or-commit "Place tag on")
                      (let ((args (magit-tag-arguments)))
                        (when current-prefix-arg
@@ -84,7 +84,7 @@ defaulting to the tag at point.
   (interactive (list (if-let ((tags (magit-region-values 'tag)))
                          (magit-confirm t nil "Delete %d tags" nil tags)
                        (let ((helm-comp-read-use-marked t))
-                         (magit-read-tag "Delete tag" t)))))
+                         (magit-read-tag "Delete tag")))))
   (magit-run-git "tag" "-d" tags))
 
 ;;;###autoload

Reply via email to