Browse files

Add magit-branch-manager-options

This can be used for hiding merged branches in branch manger,
like Github does.
  • Loading branch information...
1 parent 9baa700 commit 2a35ba5c9bd5e6f7ac7c28c46eac43837f36921c @tkf committed Dec 5, 2012
Showing with 15 additions and 4 deletions.
  1. +15 −4 magit.el
View
19 magit.el
@@ -222,6 +222,15 @@ Only considered when moving past the last entry with
:group 'magit
:type 'boolean)
+(defcustom magit-branch-manager-options nil
+ "Options for \"git branch\" command used in `magit-branch-manager'.
+
+For example, to show only non-merged branches (like Github), use
+the following configuration:
+ (setq magit-branch-manager-options '(\"--no-merged\"))"
+ :group 'magit
+ :type '(repeat string))
+
(defcustom magit-process-popup-time -1
"Popup the process buffer if a command takes longer than this many seconds."
:group 'magit
@@ -5801,10 +5810,12 @@ These are the branch names with the remote name stripped."
(defun magit-refresh-branch-manager ()
(magit-create-buffer-sections
- (magit-git-section "branches" nil 'magit-wash-branches
- "branch"
- "-vva"
- (format "--abbrev=%s" magit-sha1-abbrev-length))))
+ (apply #'magit-git-section
+ "branches" nil 'magit-wash-branches
+ "branch"
+ "-vva"
+ (format "--abbrev=%s" magit-sha1-abbrev-length)
+ magit-branch-manager-options)))
(magit-define-command branch-manager ()
(interactive)

0 comments on commit 2a35ba5

Please sign in to comment.