File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change 5757 (abbreviate-file-name git-repo))
5858 (dashboard-insert-heading git-repo))
5959 (dashboard-insert-heading
60- (concat
61- (if (dashboard-project-status-git-local-is-behind?)
62- " is behind the remote. (use \" git pull\" to update)"
63- " is up-to-date." )
64- hard-newline)))
60+ (if (dashboard-project-status-git-local-is-behind?)
61+ " is behind the remote. (use \" git pull\" to update)"
62+ " is up-to-date." )))
6563
6664(defun dashboard-project-status-insert-body ()
6765 " Insert lists of untracked, unstaged, and staged files."
6866 (dolist (section `((" Untracked Files:" . ,(git-untracked-files))
6967 (" Unstaged Files:" . ,(dashboard-project-status-git-unstaged-files))
7068 (" Staged Files:" . ,(git-staged-files))))
71- (dashboard-insert-recentf-list
72- (car section)
73- (reverse
74- (let (ret)
75- (dolist (cur (cdr section) ret)
76- (setq ret (cons (expand-file-name
77- (concat (file-name-as-directory git-repo) cur))
78- ret))))))
79- (insert hard-newline)))
69+ (when (cdr section)
70+ (insert hard-newline)
71+ (dashboard-insert-recentf-list
72+ (car section)
73+ (reverse
74+ (let (ret)
75+ (dolist (cur (cdr section) ret)
76+ (setq ret (cons (expand-file-name
77+ (concat (file-name-as-directory git-repo) cur))
78+ ret)))))))))
8079
8180(defun dashboard-project-status (project-dir &optional update )
8281 " Return a function which will insert git status for PROJECT-DIR.
You can’t perform that action at this time.
0 commit comments