update eaf package
This commit is contained in:
@@ -1 +0,0 @@
|
||||
daniel@daniel-pc.242703:1611840040
|
||||
@@ -419,7 +419,7 @@ Usage:
|
||||
) ;; with-eval-after-load 'org
|
||||
|
||||
(defun my-magit-repo-status (directory branch &optional with-update as-text)
|
||||
(when (fboundp 'magit)
|
||||
(when (featurep 'magit)
|
||||
(let* ((default-directory directory)
|
||||
(remotes (magit-list-remotes))
|
||||
(diff))
|
||||
@@ -427,14 +427,14 @@ Usage:
|
||||
(let* ((remote-branch-name (concat (car remotes) "/" branch)) ;; @{u} may not configured, TODO: (if (magit-rev-parse "@{u}") ...)
|
||||
(diff-count (magit-rev-diff-count "@" remote-branch-name))) ;; i.e. git rev-list @...origin/master --count --left-right
|
||||
(when with-update (magit-git-fetch (concat (car remotes) " " branch)))
|
||||
(setq diff (- (car diff-count) (cadr diff-count)))))
|
||||
(setq diff (- (cadr diff-count) (car diff-count)))))
|
||||
(if as-text
|
||||
(if (= diff 0) "Up-to-date"
|
||||
(if (> diff 0) "Need to pull"
|
||||
"Need to push"))
|
||||
diff))))
|
||||
(defun my-dashboard-config-update ()
|
||||
(if (fboundp 'magit)
|
||||
(if (featurep 'magit)
|
||||
(let ((diff (my-magit-repo-status "~/.config/emacs" "master")))
|
||||
(if (= diff 0) "Up-to-date"
|
||||
(if (= diff 1) "1 update"
|
||||
|
||||
Reference in New Issue
Block a user