Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Default branch to the latest visited branch #506

merged 3 commits into from

2 participants

Raimon Grau Yann Hodique
Raimon Grau

when point is not into a commit/branch, suggest last visited branch as branch name (useful for merges,rebases,checkouts, etc)

If you think an auxiliary function would be better, please say so, and I'll change it.


Yann Hodique sigma merged commit 6bdb9db into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 19, 2012
  1. Raimon Grau
Commits on Nov 20, 2012
  1. Raimon Grau

    Don't use find-if

    kidd authored
  2. Raimon Grau
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 magit.el
8 magit.el
@@ -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.
@@ -3888,7 +3889,12 @@ 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 (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
Something went wrong with that request. Please try again.