Permalink
Browse files

add latest visited branch as a fallback in magit-guess-branch

  • Loading branch information...
1 parent 4571232 commit 59371abc74f0f4332b6c54d5e41cfb4817f237d2 @kidd committed Nov 19, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 magit.el
View
@@ -3888,7 +3888,11 @@ With prefix, forces the move even if NEW already exists.
((wazzup commit)
(magit-section-info (magit-section-parent item)))
((commit) (magit-name-rev (substring info 0 magit-sha1-abbrev-length)))
- ((wazzup) info)))
+ ((wazzup) info)
+ (t (match-string 1 (find-if
+ (lambda (x)
+ (string-match "moving from \\(.*\\) to" x))
+ (magit-git-lines "reflog"))))))
;;; Remotes

0 comments on commit 59371ab

Please sign in to comment.