GNU bug report logs - #21166
24.4; vc-mode and git error on newly added file to new repository

Previous Next

Package: emacs;

Reported by: Ed Avis <eda <at> waniasset.com>

Date: Fri, 31 Jul 2015 14:44:02 UTC

Severity: minor

Tags: confirmed

Found in versions 24.5, 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Ed Avis <eda <at> waniasset.com>, 21166 <at> debbugs.gnu.org
Subject: Re: bug#21166: 24.4; vc-mode and git error on newly added file to new
 repository
Date: Fri, 31 Jul 2015 20:25:33 +0300
On 07/31/2015 05:43 PM, Ed Avis wrote:

> Type some text in the buffer, save with C-x C-s, then ask for a diff
> with C-x v =.  This fails with the following text at the bottom of the screen:
>
> -UU-:----F1  a              All L1    Git <at> master  (Fundamental) ---
> fatal: bad revision 'HEAD'

Indeed, I can reproduce this.

But it's a relatively rare situation (no commits in the repo yet), and 
the git diff output will be less useful than usual, since it's a given 
that all your files are either added or simply unregistered.

To fix this, it seems we'll have to add an extra process call to 
determine whether HEAD is a valid reference (Git internals apparently do 
that). I'm not sure it's worth it.




This bug report was last modified 4 years and 227 days ago.

Previous Next


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