Permalink
Browse files

Minor changes to `magit-list-interesting-refs'.

  • Loading branch information...
1 parent 3c16105 commit eaf3e146c3b2bb666ace3f9fc002b1d5348114d3 @philjackson philjackson committed Jan 1, 2011
Showing with 14 additions and 17 deletions.
  1. +14 −17 magit.el
View
@@ -877,32 +877,29 @@ argument or a list of strings used as regexps."
(let ((refs ()))
(dolist (line (magit-git-lines "show-ref"))
(if (string-match "[^ ]+ +\\(.*\\)" line)
- (let ((ref (match-string 1 line)))
- (cond ((and (functionp uninteresting)
- (funcall uninteresting ref)))
- ((and (not (functionp uninteresting))
- (loop for i in uninteresting
- thereis (string-match i ref))))
+ (let ((ref (match-string 1 line)))
+ (cond ((functionp uninteresting) (funcall uninteresting ref))
+ ((loop for i in uninteresting thereis (string-match i ref)))
((string-match "refs/heads/\\(.*\\)" ref)
- (let ((branch (match-string 1 ref)))
- (push (cons branch branch) refs)))
- ((string-match "refs/tags/\\(.*\\)" ref)
- (push (cons (format
+ (let ((branch (match-string 1 ref)))
+ (push (cons branch branch) refs)))
+ ((string-match "refs/tags/\\(.*\\)" ref)
+ (push (cons (format
(if (eq magit-remote-ref-format 'branch-then-remote)
"%s (tag)" "%s")
(match-string 1 ref))
ref)
- refs))
- ((string-match "refs/remotes/\\([^/]+\\)/\\(.+\\)" ref)
- (push (cons (if (eq magit-remote-ref-format 'branch-then-remote)
+ refs))
+ ((string-match "refs/remotes/\\([^/]+\\)/\\(.+\\)" ref)
+ (push (cons (if (eq magit-remote-ref-format 'branch-then-remote)
(format "%s (%s)"
(match-string 2 ref)
(match-string 1 ref))
(format "%s/%s"
- (match-string 1 ref)
- (match-string 2 ref)))
- ref)
- refs))))))
+ (match-string 1 ref)
+ (match-string 2 ref)))
+ ref)
+ refs))))))
(nreverse refs)))
(defvar magit-uninteresting-refs '("refs/remotes/\\([^/]+\\)/HEAD$"))

0 comments on commit eaf3e14

Please sign in to comment.