emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/elpa-admin_fixes b487944 2/4: * elpa-admin.el (elpaa--wor


From: Jonas Bernoulli
Subject: [elpa] scratch/elpa-admin_fixes b487944 2/4: * elpa-admin.el (elpaa--worktree): Improve output
Date: Thu, 21 Oct 2021 16:06:26 -0400 (EDT)

branch: scratch/elpa-admin_fixes
commit b48794416c82fba07bc119afc3b131ca38fd0620
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    * elpa-admin.el (elpaa--worktree): Improve output
    
    Do not put output of two different git invocations on the same line.
    
    I had problems locating the code that was responsible for the missing
    newline character because of the location of the `message' that prints
    "Cloning branch", so I also move that to where I would have expected
    it, i.e. before the code where the cloning happens.
---
 elpa-admin.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 98ebe23..b13c5b0 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1641,6 +1641,7 @@ If WITH-CORE is non-nil, it means we manage :core 
packages as well."
     (unless (file-directory-p default-directory)
       (make-directory default-directory))
     (cond ((not (file-exists-p name))
+          (message "Cloning branch %s:" name)
            (let* ((branch (concat elpaa--branch-prefix name))
                   (add-branches
                    (lambda ()
@@ -1648,7 +1649,8 @@ If WITH-CORE is non-nil, it means we manage :core 
packages as well."
                        (elpaa--call t "git" "config"
                                     "--get-all" "remote.origin.fetch")
                        (unless (or (= (point) pos)
-                                   (re-search-backward "\\*$" pos t))
+                                   (save-excursion
+                                    (re-search-backward "\\*$" pos t)))
                          (elpaa--call t "git" "remote" "set-branches"
                                       "--add" "origin" branch)
                          (when (elpaa--spec-get pkg-spec :release-branch)
@@ -1678,7 +1680,7 @@ If WITH-CORE is non-nil, it means we manage :core 
packages as well."
                        (error "No branch %s for the worktree of %s:\n%s"
                               branch name (buffer-string))))
                      (buffer-string))))
-             (message "Cloning branch %s:\n%s" name output)))
+            (message "%s" output)))
           ((not (file-exists-p (concat name "/.git")))
            (message "%s is in the way of our worktree, please remove!" name))
           (t (elpaa--pull name)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]