Skip to content

Commit

Permalink
Don't use find-if
Browse files Browse the repository at this point in the history
  • Loading branch information
kidd committed Nov 20, 2012
1 parent 59371ab commit 1dbbcd5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
;; Copyright (C) 2009, 2010 Phil Jackson.
;; Copyright (C) 2010 Philip Weaver.
;; Copyright (C) 2010 Ramkumar Ramachandra.
;; Copyright (C) 2012 Raimon Grau.
;; Copyright (C) 2010 Remco van 't Veer.
;; Copyright (C) 2009 René Stadler.
;; Copyright (C) 2010 Robin Green.
Expand Down Expand Up @@ -3889,10 +3890,11 @@ With prefix, forces the move even if NEW already exists.
(magit-section-info (magit-section-parent item)))
((commit) (magit-name-rev (substring info 0 magit-sha1-abbrev-length)))
((wazzup) info)
(t (match-string 1 (find-if
(lambda (x)
(string-match "moving from \\(.*\\) to" x))
(magit-git-lines "reflog"))))))
(t (let ((lines (magit-git-lines "reflog")))
(while (not (string-match "moving from \\(.*\\) to" (car lines)))
(setq lines (cdr lines)))
(when lines
(match-string 1 (car lines)))))))

;;; Remotes

Expand Down

0 comments on commit 1dbbcd5

Please sign in to comment.