                  (when (not (string-prefix-p " " (buffer-name buf)))
                    (with-current-buffer buf
                      (when (string-prefix-p vc-root (expand-file-name default-directory))
-                       (refresh-buffer-base-on-git-state))))))))))))
+                       (refresh-git-backed-buffer))))))))))))
 
   (defun watch-git-head ()
     (let ((file (buffer-file-name)))

  (defvar watched-git-heads nil
    "A list of .git/logs/HEAD file to watcher mappings.")

  (defun refresh-buffer-base-on-git-state ()
    "Refresh the current buffer base on the current git state."
    (if (and (boundp 'magit-mode) (derived-mode-p 'magit-mode))
        (magit-refresh-buffer)


(use-package magit
  :config
  (with-eval-after-load 'git-rebase
    ;; Vanilla undo has been completely unbound, this reenable undo in
    ;; `git-rebase-mode'
