fix fetch before counting diffs
This commit is contained in:
@@ -424,9 +424,9 @@ Usage:
|
|||||||
(remotes (magit-list-remotes))
|
(remotes (magit-list-remotes))
|
||||||
(diff))
|
(diff))
|
||||||
(when (= (length remotes) 1)
|
(when (= (length remotes) 1)
|
||||||
|
(when with-update (magit-git-string "fetch" (car remotes) branch))
|
||||||
(let* ((remote-branch-name (concat (car remotes) "/" branch)) ;; @{u} may not configured, TODO: (if (magit-rev-parse "@{u}") ...)
|
(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
|
(diff-count (magit-rev-diff-count "@" remote-branch-name))) ;; i.e. git rev-list @...origin/master --count --left-right
|
||||||
(when with-update (magit-git-string "fetch" (car remotes) branch))
|
|
||||||
(setq diff (- (cadr diff-count) (car diff-count)))))
|
(setq diff (- (cadr diff-count) (car diff-count)))))
|
||||||
(if as-text
|
(if as-text
|
||||||
(if (= diff 0) "Up-to-date"
|
(if (= diff 0) "Up-to-date"
|
||||||
|
|||||||
Reference in New Issue
Block a user