Commit 7859b1d5 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-remote-prune-refspecs: Make description more explicit

Closes #3388.
parent 6258dd92
......@@ -7,7 +7,7 @@
#+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: Magit: (magit).
#+TEXINFO_DIR_DESC: Using Git from Emacs with Magit.
#+SUBTITLE: for version 2.11.0 (2.11.0-593-g6266eb110+1)
#+SUBTITLE: for version 2.11.0 (2.11.0-594-g6258dd92c+1)
#+BIND: ox-texinfo+-before-export-hook ox-texinfo+-update-version-strings
#+TEXINFO_DEFFN: t
......@@ -22,7 +22,7 @@ directly from within Emacs. While many fine Git clients exist, only
Magit and Git itself deserve to be called porcelains.
#+TEXINFO: @noindent
This manual is for Magit version 2.11.0 (2.11.0-593-g6266eb110+1).
This manual is for Magit version 2.11.0 (2.11.0-594-g6258dd92c+1).
#+BEGIN_QUOTE
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@bernoul.li>
......@@ -5542,10 +5542,21 @@ Also see [[man:git-remote]]
- Key: M P, magit-remote-prune-refspecs
This command removes stale refspecs and tracking branches for a
remote read in the minibuffer. If there are only stale refspecs,
then offer to either delete the remote or replace the refspecs with
the default refspec instead.
This command removes stale refspecs for a remote read in the
minibuffer.
A refspec is stale if there no longer exists at least one branch
on the remote that would be fetched due to that refspec. A stale
refspec is problematic because its existence causes Git to refuse
to fetch according to the remaining non-stale refspecs.
If only stale refspecs remain, then this command offers to either
delete the remote or to replace the stale refspecs with the default
refspec ("+refs/heads/*:refs/remotes/REMOTE/*").
This command also removes the remote-tracking branches that were
created due to the now stale refspecs. Other stale branches are
not removed.
- User Option: magit-remote-add-set-remote.pushDefault
......
......@@ -30,7 +30,7 @@ General Public License for more details.
@finalout
@titlepage
@title Magit User Manual
@subtitle for version 2.11.0 (2.11.0-593-g6266eb110+1)
@subtitle for version 2.11.0 (2.11.0-594-g6258dd92c+1)
@author Jonas Bernoulli
@page
@vskip 0pt plus 1filll
......@@ -52,7 +52,7 @@ directly from within Emacs. While many fine Git clients exist, only
Magit and Git itself deserve to be called porcelains.
@noindent
This manual is for Magit version 2.11.0 (2.11.0-593-g6266eb110+1).
This manual is for Magit version 2.11.0 (2.11.0-594-g6258dd92c+1).
@quotation
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@@bernoul.li>
......@@ -7521,10 +7521,21 @@ read in the minibuffer.
@cindex magit-remote-prune-refspecs
@item @kbd{M P} @tie{}@tie{}@tie{}@tie{}(@code{magit-remote-prune-refspecs})
This command removes stale refspecs and tracking branches for a
remote read in the minibuffer. If there are only stale refspecs,
then offer to either delete the remote or replace the refspecs with
the default refspec instead.
This command removes stale refspecs for a remote read in the
minibuffer.
A refspec is stale if there no longer exists at least one branch
on the remote that would be fetched due to that refspec. A stale
refspec is problematic because its existence causes Git to refuse
to fetch according to the remaining non-stale refspecs.
If only stale refspecs remain, then this command offers to either
delete the remote or to replace the stale refspecs with the default
refspec ("+refs/heads/*:refs/remotes/REMOTE/*").
This command also removes the remote-tracking branches that were
created due to the now stale refspecs. Other stale branches are
not removed.
@end table
......
......@@ -203,9 +203,18 @@ to be used to view and change remote related variables."
;;;###autoload
(defun magit-remote-prune-refspecs (remote)
"Remove stale refspecs and tracking branches for REMOTE.
If there are only stale refspecs, then offer to either delete the
remote or replace the refspecs with the default refspec instead."
"Remove stale refspecs for REMOTE.
A refspec is stale if there no longer exists at least one branch
on the remote that would be fetched due to that refspec. A stale
refspec is problematic because its existence causes Git to refuse
to fetch according to the remaining non-stale refspecs.
If only stale refspecs remain, then offer to either delete the
remote or to replace the stale refspecs with the default refspec.
Also remove the remote-tracking branches that were created due to
the now stale refspecs. Other stale branches are not removed."
(interactive (list (magit-read-remote "Prune refspecs of remote")))
(let* ((tracking-refs (magit-list-remote-branches remote))
(remote-refs (magit-remote-list-refs remote))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment