Skip to content

Commit

Permalink
status: don't insert staged changes for bare repos
Browse files Browse the repository at this point in the history
Re: #2713
  • Loading branch information
kyleam committed Jul 4, 2016
1 parent 58fc4a3 commit 923fdb9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lisp/magit.el
Expand Up @@ -483,7 +483,12 @@ Type \\[magit-commit-popup] to create a commit.
\\{magit-status-mode-map}"
:group 'magit-status
(hack-dir-local-variables-non-file-buffer))
(hack-dir-local-variables-non-file-buffer)
;; Avoid listing all files as deleted when visiting a bare repo.
(when (magit-bare-repo-p)
(make-local-variable 'magit-status-sections-hook)
(remove-hook 'magit-status-sections-hook #'magit-insert-staged-changes
'local)))

;;;###autoload
(defun magit-status (&optional directory)
Expand Down

0 comments on commit 923fdb9

Please sign in to comment.