From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Lars Ingebrigtsen <larsi@gnus.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#21166: 24.4;
 vc-mode and git error on newly added file to new repository
Date: Tue, 25 Aug 2020 11:04:07 +0200
Message-ID: <87ft8bdrlk.fsf@gnus.org>
References: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local>
 <55BBB3F0.30709@yandex.ru>
 <7E039918541B4C4183BFDB8F015C743032E5E6EC@WCL-EXCH02.wcl.local>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="25050"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Cc: 'Dmitry Gutov' <dgutov@yandex.ru>,
 "21166@debbugs.gnu.org" <21166@debbugs.gnu.org>
To: Ed Avis <eda@waniasset.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 25 11:05:17 2020
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1kAUtH-0006Nm-UJ
	for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 11:05:15 +0200
Original-Received: from localhost ([::1]:55396 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1kAUtG-0005Pd-Qe
	for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Aug 2020 05:05:14 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38150)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1kAUt4-0005MV-5l
 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 05:05:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:48722)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1kAUt3-00047Q-SP
 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 05:05:01 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1kAUt3-0007xx-NC
 for bug-gnu-emacs@gnu.org; Tue, 25 Aug 2020 05:05:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Lars Ingebrigtsen <larsi@gnus.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Tue, 25 Aug 2020 09:05:01 +0000
Resent-Message-ID: <handler.21166.B21166.159834626530569@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 21166
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: confirmed
Original-Received: via spool by 21166-submit@debbugs.gnu.org id=B21166.159834626530569
 (code B ref 21166); Tue, 25 Aug 2020 09:05:01 +0000
Original-Received: (at 21166) by debbugs.gnu.org; 25 Aug 2020 09:04:25 +0000
Original-Received: from localhost ([127.0.0.1]:60268 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1kAUsT-0007wy-Cs
 for submit@debbugs.gnu.org; Tue, 25 Aug 2020 05:04:25 -0400
Original-Received: from quimby.gnus.org ([95.216.78.240]:38666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@gnus.org>) id 1kAUsP-0007wa-K5
 for 21166@debbugs.gnu.org; Tue, 25 Aug 2020 05:04:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=8XFbi2eyp6iisdlymt6CjBwJzfx4Gg8lKIZ4F13MzFQ=; b=Evp+ulL417BuhL0JDxFTvu/dLN
 AAgryrA95AlxffPJbjXYVlbc65i/NWyqWFJwOXlfcFHBxBUYYW27O2PSYmzj0P3eP6JuXb4ZwOEbP
 bx8rtwgXTB20MOb/5f0mRu+FehfALt76RTfwTg665FEbMu4IMfcOsTkjLcL/I2TIRzxc=;
Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@gnus.org>)
 id 1kAUsD-0003Vv-0O; Tue, 25 Aug 2020 11:04:14 +0200
X-Now-Playing: Jim O'Rourke's _To Magnetize Money and Return a Roving Eye
 (2)_: "To Magnetize Money and Return a Roving Eye pt2"
In-Reply-To: <7E039918541B4C4183BFDB8F015C743032E5E6EC@WCL-EXCH02.wcl.local>
 (Ed Avis's message of "Tue, 4 Aug 2015 14:58:10 +0000")
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.bugs:186240
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/186240>

Ed Avis <eda@waniasset.com> writes:

> How about this: check for the error message, and if found then just
> print 'empty tree, so no diff to print'.
> That would be good enough.  No need for an extra process call either
> before or after.

This was five years ago.  I tried this in Emacs 28, and the problem is
still present.

As Dmitry says, this is a quite unusual situation, so perhaps the
current error message

fatal: bad revision 'HEAD'

is fine?  It's slightly confusing...  but not very.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no