Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into next

  • Loading branch information...
commit 4ca464317167700b19c1dc5553f19023db60bed1 2 parents aed9d8e + 3a8838e
@sigma sigma authored
Showing with 17 additions and 8 deletions.
  1. +17 −8 magit.el
View
25 magit.el
@@ -1790,10 +1790,12 @@ one for all, one for current lineage."
TITLE is the displayed title of the section."
(let ((fun (intern (format "magit-jump-to-%s" sym)))
(doc (format "Jump to section `%s'." title)))
- `(defun ,fun ()
- ,doc
- (interactive)
- (magit-goto-section-at-path '(,sym)))))
+ `(progn
+ (defun ,fun ()
+ ,doc
+ (interactive)
+ (magit-goto-section-at-path '(,sym)))
+ (put ',fun 'definition-name ',sym))))
(defmacro magit-define-inserter (sym arglist &rest body)
(declare (indent defun))
@@ -1808,7 +1810,10 @@ TITLE is the displayed title of the section."
,doc
(run-hooks ',before)
,@body
- (run-hooks ',after)))))
+ (run-hooks ',after))
+ (put ',before 'definition-name ',sym)
+ (put ',after 'definition-name ',sym)
+ (put ',fun 'definition-name ',sym))))
(defvar magit-highlighted-section nil)
@@ -1999,7 +2004,9 @@ function can be enriched by magit extension like magit-topgit and magit-svn"
,inter
(or (run-hook-with-args-until-success
',hook ,@(remq '&optional (remq '&rest arglist)))
- ,@instr)))))
+ ,@instr))
+ (put ',fun 'definition-name ',sym)
+ (put ',hook 'definition-name ',sym))))
;;; Running commands
@@ -5619,7 +5626,7 @@ These are the branch names with the remote name stripped."
"\\([0-9a-fA-F]+\\)" ; 3: sha1
" "
"\\(?:\\["
- "\\([^:]+?\\)" ; 4: tracking (non-greedy + to avoid matching \n)
+ "\\([^:\n]+?\\)" ; 4: tracking (non-greedy + to avoid matching \n)
"\\(?:: \\)?"
"\\(?:ahead \\([0-9]+\\)\\)?" ; 5: ahead
"\\(?:, \\)?"
@@ -5668,7 +5675,9 @@ These are the branch names with the remote name stripped."
(concat " -> " (substring other-ref (+ 1 (length remote-name))))
"")
; tracking information
- (if tracking
+ (if (and tracking
+ (equal (magit-remote-branch-for branch t)
+ (concat "refs/remotes/" tracking)))
(concat " ["
; getting rid of the tracking branch name if it is the same as the branch name
(let* ((tracking-remote (magit-get "branch" branch "remote"))
Please sign in to comment.
Something went wrong with that request. Please try again.