[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin 7fa8f34 399/439: * elpa-admin.el (elpaa--pull): Don'
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin 7fa8f34 399/439: * elpa-admin.el (elpaa--pull): Don't set non-existing upstream |
Date: |
Sun, 17 Oct 2021 15:48:44 -0400 (EDT) |
branch: elpa-admin
commit 7fa8f34da99203b6d6ffef72958a25bb09878021
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* elpa-admin.el (elpaa--pull): Don't set non-existing upstream
---
elpa-admin.el | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index e9b59d4..2e5d265 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1025,22 +1025,28 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(message "Running git pull in %S" default-directory)
(elpaa--call t "git" "pull"))
((file-exists-p ".git") ;A worktree, presumably.
- (let ((status
+ (let ((status
(with-temp-buffer
(let ((elpaa--debug nil))
(elpaa--call t "git" "status" "--branch" "--porcelain=2"))
(buffer-string))))
(if (string-match (regexp-quote "\n# branch.ab +0 -0") status)
(elpaa--message "%s up-to-date" dirname)
- (unless (or (string-match "\n# branch.upstream" status)
- (not (string-match
- (concat "\n# branch.head \\("
- (regexp-quote elpaa--branch-prefix)
- ".*\\)")
- status)))
- ;; No upstream set yet.
- (elpaa--call t "git" "branch" "--set-upstream-to"
- (concat "origin/" (match-string 1 status))))
+ ;; Set upstream if applicable.
+ (when (and
+ ;; Upstream not set yet!
+ (not (string-match "\n# branch.upstream" status))
+ ;; This is one of the "elpa-managed" branches.
+ (string-match
+ (concat "\n# branch.head \\("
+ (regexp-quote elpaa--branch-prefix)
+ ".*\\)")
+ status))
+ (let* ((br (match-string 1 status))
+ (ortb (concat "origin/" br)))
+ ;; There is an upstream to set it to!
+ (when (elpaa--git-branch-p ortb)
+ (elpaa--call t "git" "branch" "--set-upstream-to" ortb))))
(message "Updating worktree in %S" default-directory)
(elpaa--call t "git" "merge"))))
(t (error "No .git in %S" default-directory)))
- [nongnu] elpa-admin 1d5287f 362/439: * elpa-admin.el: Add support for building Info files and "dir" files, (continued)
- [nongnu] elpa-admin 1d5287f 362/439: * elpa-admin.el: Add support for building Info files and "dir" files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b3fe7c4 368/439: * elpa-admin.el (elpaa--email-reply-to): New var, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 21fc443 349/439: * externals-list ("markdown-mode"): New package, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin cabb85a 398/439: * elpa-admin.el: Avoid build side-products in the tarball, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 08c448d 400/439: * elpa-admin.el (elpaa--pull): Fix last change, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 21e1b0e 101/439: Sync with yasnippet/master, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7b7692d 243/439: Merge commit '6dc971269f6f9435e5159c2cfe66fc5e4b296df2', Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 858666e 250/439: * admin/archive-contents.el: Use cl-lib, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin f4e99d9 369/439: * elpa-admin.el (elpaa--make-one-package): Fix thinko, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8ac87bb 355/439: Fold ert-support.el into elpa-admin.el, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7fa8f34 399/439: * elpa-admin.el (elpaa--pull): Don't set non-existing upstream,
Philip Kaludercic <=
- [nongnu] elpa-admin 78966fe 348/439: * README.org: Improve introductory paragraphs., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 1ddc741 347/439: * README.org: Prefer org syntax and prepare for export., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0466964 352/439: * README.org (Adding a package): Adjust to use the new `make` targets, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a74eed7 366/439: * elpa-admin.el (elpaa--bwrap-args): Add `lib64` for amd64 hosts, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 60ecd84 351/439: * admin/archive-contents.el: Fix construction of index.html, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin dcc3222 396/439: Fix various problems when compiling packages in place, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d1d1dbd 393/439: * elpa-admin.el (elpaa--build-Info): Fix last change, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0942ea5 385/439: ; * README.org: Fix typos., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 21cddee 407/439: * elpa-admin.el (elpaa--get-devel-version): Fix regexp substitution, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin ee591c2 379/439: * elpa-admin.el (elpaa--release-email): Cc maintainer, Philip Kaludercic, 2021/10/17