GNU bug report logs - #65049
29.1; vc-do-command fails in windows emacs 29.1

Previous Next

Package: emacs;

Reported by: Maxim Kim <habamax <at> gmail.com>

Date: Fri, 4 Aug 2023 07:51:01 UTC

Severity: normal

Found in version 29.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 65049 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Kim <habamax <at> gmail.com>
To: 65049 <at> debbugs.gnu.org
Subject: Re: bug#65049: Minor update to the repro steps
Date: Mon, 07 Aug 2023 11:09:09 +1000
It looks like line ending issue, I have tried generated patch in a terminal:

    PS C:\Users\maxim.kim\.emacs.d> git --no-pager apply --cached ..\AppData\Local\Temp\git-patchyYAcN5
    error: patch failed: init.el:1
    error: init.el: patch does not apply

Then added --ignore-space-change (found in
https://www.delftstack.com/howto/git/git-patch-does-not-apply/#troubleshoot-git-patch-error-patch-does-not-apply
and in magit issues https://github.com/magit/magit/issues/1139 plus
linked https://github.com/magit/magit/issues/487#issuecomment-31727377)

    PS C:\Users\maxim.kim\.emacs.d> git --no-pager apply --ignore-space-change --cached ..\AppData\Local\Temp\git-patchyYAcN5
    PS C:\Users\maxim.kim\.emacs.d>

and git apply worked out.

Then I changed line 1058 in vc-git-checkin to:

              (vc-git-command nil 0 patch-file "apply" "--ignore-space-change" "--cached")

And now it looks like it "works", however I can see a change in line
endings for the patched lines (here I have changed first line and
after comitting I can see ^M there):

 ;;; init.el --- emacs init file -*- lexical-binding: t; -*-^M
;;; Commentary:
;; Maxim Kim <habamax <at> gmail.com>
;;; Code:


Not sure what a proper fix should look like though.




This bug report was last modified 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.