core: reduce number of git commands to check for new version
Fixes #6692
This commit is contained in:
parent
cce0213273
commit
265faecbba
1 changed files with 7 additions and 5 deletions
|
@ -120,7 +120,8 @@ OWNER REPO."
|
||||||
(let ((url (format "https://github.com/%s/%s" owner repo)))
|
(let ((url (format "https://github.com/%s/%s" owner repo)))
|
||||||
(spacemacs/git-remove-remote remote)
|
(spacemacs/git-remove-remote remote)
|
||||||
(spacemacs/git-add-remote remote url)
|
(spacemacs/git-add-remote remote url)
|
||||||
(spacemacs/git-fetch-remote remote)
|
;; removing this call according to issue #6692 proposal
|
||||||
|
;; (spacemacs/git-fetch-remote remote)
|
||||||
(spacemacs/git-fetch-tags remote branch))
|
(spacemacs/git-fetch-tags remote branch))
|
||||||
(let ((version (spacemacs/git-latest-tag remote branch)))
|
(let ((version (spacemacs/git-latest-tag remote branch)))
|
||||||
(when version
|
(when version
|
||||||
|
@ -172,7 +173,7 @@ version and the NEW version."
|
||||||
|
|
||||||
(defun spacemacs/git-fetch-remote (remote)
|
(defun spacemacs/git-fetch-remote (remote)
|
||||||
"Fetch last commits from REMOTE, return t if no error."
|
"Fetch last commits from REMOTE, return t if no error."
|
||||||
(let((proc-buffer "git-remove-remote")
|
(let((proc-buffer "git-fetch-remote")
|
||||||
(default-directory (file-truename spacemacs-start-directory)))
|
(default-directory (file-truename spacemacs-start-directory)))
|
||||||
(prog1
|
(prog1
|
||||||
(eq 0 (process-file "git" nil proc-buffer nil
|
(eq 0 (process-file "git" nil proc-buffer nil
|
||||||
|
@ -184,9 +185,10 @@ version and the NEW version."
|
||||||
(let((proc-buffer "git-fetch-tags")
|
(let((proc-buffer "git-fetch-tags")
|
||||||
(default-directory (file-truename spacemacs-start-directory)))
|
(default-directory (file-truename spacemacs-start-directory)))
|
||||||
(prog2
|
(prog2
|
||||||
;; seems necessary to fetch first
|
;;;; original comment: seems necessary to fetch first
|
||||||
(eq 0 (process-file "git" nil proc-buffer nil
|
;; but we remove this according to issue #6692 proposal
|
||||||
"fetch" remote branch))
|
;; (eq 0 (process-file "git" nil proc-buffer nil
|
||||||
|
;; "fetch" remote branch))
|
||||||
;; explicitly fetch the new tags
|
;; explicitly fetch the new tags
|
||||||
(eq 0 (process-file "git" nil proc-buffer nil
|
(eq 0 (process-file "git" nil proc-buffer nil
|
||||||
"fetch" "--tags" remote branch))
|
"fetch" "--tags" remote branch))
|
||||||
|
|
Reference in a new issue