Skip to content

[Bug/Support]: Fetch/Update logging operations causes subprocess error #460

@celadevra

Description

@celadevra

Confirmation

  • I have checked the documentation (README, Wiki, docstrings, etc)
  • I am checking these without reading them.
  • I have searched previous issues to see if my question is a duplicate.

Elpaca Version

Elpaca 5b3aeb2 HEAD -> master ## I have committed my edits locally so this might not be useful. I am only 1 commit ahead of origin/master (400eb4c)
installer: 0.11
emacs-version: GNU Emacs 30.1 (build 2, x86_64-w64-mingw32)
of 2025-02-24
git --version: git version 2.48.1

Operating System

Windows 11

Description

How to reproduce: start elpaca-manager, g i to list installed packages, pick any one and press f x to fetch updates.

Error message in *elpaca-info* buffer:

[2025-05-16 13:09:07] $git fetch --all -v
[2025-05-16 13:09:13] Subprocess error (see previous log entries)

Expected behaviour: package fetched/updated successfully.

Possible cause: run the git log command in a terminal, and the current command for getting commit messages causes the shell to report error.

fatal: invalid object name '18'.

This might be because the date and the formatting characters as part of the --pretty= arguments are not quoted, and Windows system does not recognize them correctly.

I have tried to modify the corresponding function elpaca--log-updates in elpaca.el. After a rebuild and restart, elpaca-fetch etc. works as expected.

diff --git a/elpaca.el b/elpaca.el
index 07eecfe..f9d44c4 100644
--- a/elpaca.el
+++ b/elpaca.el
@@ -1817,8 +1817,8 @@ With a prefix argument, rebuild current file's package or prompt if none found."
     (elpaca--make-process e
       :name "log-updates"
       ;; Pager breaks pipe process.
-      :command (list "git" "--no-pager" "log" "--reverse" (concat "--since=" date)
-                     "--pretty=%h %s (%ch)" "..@{u}")
+      :command (list "git" "--no-pager" "log" "--reverse" (concat "--since=\"" date "\"")
+                     "--pretty=\"%h %s (%ch)\"" "\"..@{u}\"")
       :sentinel (lambda (process event) (elpaca--process-sentinel nil nil process event)))))
 
 (defun elpaca--fetch (e &rest command)

I can create a pull request if this is indeed the cause of the problem, and the fix does not break other things.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions