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 57
57
(abbreviate-file-name git-repo))
58
58
(dashboard-insert-heading git-repo))
59
59
(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." )))
65
63
66
64
(defun dashboard-project-status-insert-body ()
67
65
" Insert lists of untracked, unstaged, and staged files."
68
66
(dolist (section `((" Untracked Files:" . ,(git-untracked-files))
69
67
(" Unstaged Files:" . ,(dashboard-project-status-git-unstaged-files))
70
68
(" 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)))))))))
80
79
81
80
(defun dashboard-project-status (project-dir &optional update )
82
81
" Return a function which will insert git status for PROJECT-DIR.
You can’t perform that action at this time.
0 commit comments