Merge branch 'master' into empty-commit

This commit is contained in:
Nathan Weizenbaum 2010-06-24 17:31:48 -07:00
commit 120c5f8ec0

View file

@ -302,6 +302,9 @@ Many Magit faces inherit from this one by default."
(defvar magit-completing-read 'completing-read
"Function to be called when requesting input from the user.")
(defvar magit-read-rev-history nil
"The history of inputs to `magit-read-rev'.")
(defvar magit-omit-untracked-dir-contents nil
"When non-nil magit will only list an untracked directory, not its contents.")
@ -468,7 +471,7 @@ Many Magit faces inherit from this one by default."
dirs))))
(defun magit-get-top-dir (cwd)
(let ((cwd (expand-file-name cwd)))
(let ((cwd (expand-file-name (file-truename cwd))))
(when (file-directory-p cwd)
(let* ((default-directory cwd)
(cdup (magit-git-string "rev-parse" "--show-cdup")))
@ -587,7 +590,7 @@ return nil."
(format "%s: " prompt)))
(interesting-refs (magit-list-interesting-refs))
(reply (funcall magit-completing-read prompt interesting-refs
nil nil nil nil def))
nil nil nil 'magit-read-rev-history def))
(rev (or (cdr (assoc reply interesting-refs)) reply)))
(if (string= rev "")
nil
@ -4037,7 +4040,12 @@ Return values:
(defun magit--branch-name-from-line (line)
"Extract the branch name from line LINE of 'git branch' output."
(get-text-property 0 'branch-name line))
(let ((branch (get-text-property 0 'branch-name line)))
(if (and branch
(get-text-property 0 'remote line)
(string-match-p "^remotes/" branch))
(substring branch 8)
branch)))
(defun magit--branch-name-at-point ()
"Get the branch name in the line at point."
@ -4096,7 +4104,8 @@ With prefix force the removal even it it hasn't been merged."
)
branch-line)
(let ((res (list (cons 'current (match-string 1 branch-line))
(cons 'branch (match-string 2 branch-line)))))
(cons 'branch (match-string 2 branch-line))
(cons 'remote (string-match-p "^remotes/" (match-string 2 branch-line))))))
(if (match-string 4 branch-line)
(cons (cons 'other-ref (match-string 6 branch-line)) res)
(append