[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 781544586b: magit-branch-delete: Reference magi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 781544586b: magit-branch-delete: Reference magit-no-confirm in documentation |
Date: |
Sat, 18 Mar 2023 15:01:16 -0400 (EDT) |
branch: elpa/git-commit
commit 781544586b0b69ddff193b65d5d0f9c923a385b2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit-branch-delete: Reference magit-no-confirm in documentation
Closes #4905.
---
docs/magit.org | 6 ++++++
docs/magit.texi | 6 ++++++
lisp/magit-branch.el | 9 ++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/docs/magit.org b/docs/magit.org
index 68d8ecdcd9..e8eef615ed 100644
--- a/docs/magit.org
+++ b/docs/magit.org
@@ -5142,6 +5142,12 @@ The variables are described in [[*Branch Git Variables]].
branches, then offer to delete those. Otherwise, prompt for a single
branch to be deleted, defaulting to the branch at point.
+ Require confirmation when deleting branches is dangerous in some
+ way. Option ~magit-no-confirm~ can be customized to not require
+ confirmation in certain cases. See its docstring to learn why
+ confirmation is required by default in certain cases or if a
+ prompt is confusing.
+
- Key: b m (magit-branch-rename) ::
Rename a branch. The branch and the new name are read in the
diff --git a/docs/magit.texi b/docs/magit.texi
index 0fcf0418de..50338b8718 100644
--- a/docs/magit.texi
+++ b/docs/magit.texi
@@ -6334,6 +6334,12 @@ Delete one or multiple branches. If the region marks
multiple
branches, then offer to delete those. Otherwise, prompt for a single
branch to be deleted, defaulting to the branch at point.
+Require confirmation when deleting branches is dangerous in some
+way. Option @code{magit-no-confirm} can be customized to not require
+confirmation in certain cases. See its docstring to learn why
+confirmation is required by default in certain cases or if a
+prompt is confusing.
+
@item @kbd{b m} (@code{magit-branch-rename})
@kindex b m
@findex magit-branch-rename
diff --git a/lisp/magit-branch.el b/lisp/magit-branch.el
index 85e7c876fc..4b8b100ab3 100644
--- a/lisp/magit-branch.el
+++ b/lisp/magit-branch.el
@@ -543,9 +543,16 @@ that is being reset."
;;;###autoload
(defun magit-branch-delete (branches &optional force)
"Delete one or multiple branches.
+
If the region marks multiple branches, then offer to delete
those, otherwise prompt for a single branch to be deleted,
-defaulting to the branch at point."
+defaulting to the branch at point.
+
+Require confirmation when deleting branches is dangerous in some
+way. Option `magit-no-confirm' can be customized to not require
+confirmation in certain cases. See its docstring to learn why
+confirmation is required by default in certain cases or if a
+prompt is confusing."
;; One would expect this to be a command as simple as, for example,
;; `magit-branch-rename'; but it turns out everyone wants to squeeze
;; a bit of extra functionality into this one, including myself.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit 781544586b: magit-branch-delete: Reference magit-no-confirm in documentation,
ELPA Syncer <=