Commit 7683203c authored by Noam Postavsky's avatar Noam Postavsky Committed by Jonas Bernoulli

Use magit-get instead of magit-git-string

It's cached more aggressively.

parent a1617483
......@@ -381,11 +381,11 @@ current branch. The description is taken from the Git variable
`branch.<NAME>.description'; if that is undefined then no header
line is inserted at all."
(let ((branch (magit-get-current-branch)))
(--when-let (magit-git-lines
"config" (format "branch.%s.description" branch))
(-when-let* ((desc (magit-get "branch" branch "description"))
(desc-lines (split-string desc "\n")))
(magit-insert-section (branchdesc branch t)
(magit-insert-heading branch ": " (car it))
(insert (mapconcat 'identity (cdr it) "\n"))
(magit-insert-heading branch ": " (car desc-lines))
(insert (mapconcat 'identity (cdr desc-lines) "\n"))
(insert "\n\n")))))
(defun magit-insert-local-branches ()
......@@ -373,8 +373,7 @@ detached `HEAD'."
"Insert a header line about branch usually pulled into current branch."
(when pull
(magit-insert-section (branch pull)
(let ((rebase (magit-git-string "config"
(format "branch.%s.rebase" branch))))
(let ((rebase (magit-get "branch" branch "rebase")))
(pcase rebase
("false" (setq rebase nil))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment