GNU bug report logs - #78987
30.1; Unable to create new Git repository in Dired mode

Previous Next

Package: emacs;

Reported by: "Zipei Lu" <zipeilu <at> qq.com>

Date: Wed, 9 Jul 2025 21:57:09 UTC

Severity: normal

Found in version 30.1

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: Eli Zaretskii <eliz <at> gnu.org>, stephen.berman <at> gmx.net, 78987 <at> debbugs.gnu.org
Subject: Re: bug#78987: 30.1; Unable to create new Git repository in Dired mode
Date: Wed, 16 Jul 2025 09:20:01 +0300
>> Do you have an idea how to handle an empty repository on the first commit?
>> Or this needs a separate bug report?
>
> I think this is a bug in vc-git-diff.  Does this fix it:
>
> @@ -1818,7 +1818,10 @@ vc-git-diff
> -      (unless rev1 (setq rev1 "HEAD")))
> +      (unless rev1
> +        (setq rev1 (if (vc-git--empty-db-p)
> +                       "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
> +                     "HEAD"))))

Thanks, I confirm it's fixed not only for the reported case,
but generally for all uses of vc-diff in an empty repository.




This bug report was last modified 31 days ago.

Previous Next


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