Commit 6258dd92 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-remote-prune: New command

parent 6266eb11
......@@ -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-592-g31976d040+1)
#+SUBTITLE: for version 2.11.0 (2.11.0-593-g6266eb110+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-592-g31976d040+1).
This manual is for Magit version 2.11.0 (2.11.0-593-g6266eb110+1).
#+BEGIN_QUOTE
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@bernoul.li>
......@@ -5535,7 +5535,12 @@ Also see [[man:git-remote]]
This command deletes a remote, read in the minibuffer.
- Key: M p, magit-remote-prune-refspecs
- Key: M p, magit-remote-prune
This command removes stale remote-tracking branches for a remote
read in the minibuffer.
- 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,
......
......@@ -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-592-g31976d040+1)
@subtitle for version 2.11.0 (2.11.0-593-g6266eb110+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-592-g31976d040+1).
This manual is for Magit version 2.11.0 (2.11.0-593-g6266eb110+1).
@quotation
Copyright (C) 2015-2018 Jonas Bernoulli <jonas@@bernoul.li>
......@@ -7511,8 +7511,15 @@ new url are read in the minibuffer.
This command deletes a remote, read in the minibuffer.
@kindex M p
@cindex magit-remote-prune
@item @kbd{M p} @tie{}@tie{}@tie{}@tie{}(@code{magit-remote-prune})
This command removes stale remote-tracking branches for a remote
read in the minibuffer.
@kindex M P
@cindex magit-remote-prune-refspecs
@item @kbd{M p} @tie{}@tie{}@tie{}@tie{}(@code{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,
......
......@@ -136,8 +136,9 @@ to be used to view and change remote related variables."
:actions '((?a "Add" magit-remote-add)
(?C "Configure..." magit-remote-config-popup)
(?r "Rename" magit-remote-rename)
(?p "Prune refspecs" magit-remote-prune-refspecs)
(?k "Remove" magit-remote-remove))
(?p "Prune stale branches" magit-remote-prune)
(?k "Remove" magit-remote-remove)
(?p "Prune stale refspecs" magit-remote-prune-refspecs))
:max-action-columns 2)
;;;; Commands
......@@ -194,6 +195,12 @@ to be used to view and change remote related variables."
(defconst magit--refspec-re "\\`\\(\\+\\)?\\([^:]+\\):\\(.*\\)\\'")
;;;###autoload
(defun magit-remote-prune (remote)
"Remove stale remote-tracking branches for REMOTE."
(interactive (list (magit-read-remote "Prune stale branches of remote")))
(magit-run-git-async "remote" "prune" remote))
;;;###autoload
(defun magit-remote-prune-refspecs (remote)
"Remove stale refspecs and tracking branches for 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