From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 31 10:43:54 2015 Received: (at submit) by debbugs.gnu.org; 31 Jul 2015 14:43:54 +0000 Received: from localhost ([127.0.0.1]:35941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLBXN-0005NT-ML for submit@debbugs.gnu.org; Fri, 31 Jul 2015 10:43:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34085) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLBXK-0005NJ-GJ for submit@debbugs.gnu.org; Fri, 31 Jul 2015 10:43:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLBXD-0006ts-RO for submit@debbugs.gnu.org; Fri, 31 Jul 2015 10:43:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLBXD-0006tk-OL for submit@debbugs.gnu.org; Fri, 31 Jul 2015 10:43:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLBX8-0003JK-LG for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 10:43:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLBX3-0006Yv-Fu for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 10:43:38 -0400 Received: from mail1.bemta3.messagelabs.com ([195.245.230.164]:50125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLBX3-0006V9-5y for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2015 10:43:33 -0400 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id B1/6B-09570-3998BB55; Fri, 31 Jul 2015 14:43:31 +0000 X-Env-Sender: eda@waniasset.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1438353810!31017813!1 X-Originating-IP: [213.212.127.155] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=waniasset.com,-,- X-VirusChecked: Checked Received: (qmail 4284 invoked from network); 31 Jul 2015 14:43:30 -0000 Received: from unknown (HELO WCL-EXCHCAS03.wcl.local) (213.212.127.155) by server-15.tower-31.messagelabs.com with AES128-SHA encrypted SMTP; 31 Jul 2015 14:43:30 -0000 Received: from WCL-EXCH02.wcl.local ([169.254.1.57]) by WCL-EXCHCAS03.wcl.local ([149.85.126.212]) with mapi id 14.03.0123.003; Fri, 31 Jul 2015 15:43:30 +0100 From: Ed Avis To: "'bug-gnu-emacs@gnu.org'" Subject: 24.4; vc-mode and git error on newly added file to new repository Thread-Topic: 24.4; vc-mode and git error on newly added file to new repository Thread-Index: AdDLnrzz5kFiFpc+QBSz1E14nD58sw== Date: Fri, 31 Jul 2015 14:43:29 +0000 Message-ID: <7E039918541B4C4183BFDB8F015C743032E5C24D@WCL-EXCH02.wcl.local> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [149.85.127.168] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) At the shell make an empty git working tree and add one file to it, but without committing, then edit it in Emacs: % mkdir test % cd test % git init Initialized empty Git repository in /home/eda/test/.git/ % echo >a % git add a % emacs -Q a Type some text in the buffer, save with C-x C-s, then ask for a diff with C-x v =3D. This fails with the following text at the bottom of the s= creen: -UU-:----F1 a All L1 Git@master (Fundamental) --- fatal: bad revision 'HEAD' -UUU:**--F1 *vc-diff* All L1 (Fundamental from a) ---- Running git --no-pager diff-index --exit-code -p HEAD -- a...FAILED (stat= us 128) In GNU Emacs 24.4.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 2014-11-03 on wcl-linux04.wcl.local Configured using: `configure --build=3Dx86_64-redhat-linux-gnu --host=3Dx86_64-redhat-linux-gnu --program-prefix=3D --disable-dependency-tracking --prefix=3D/usr --exec-prefix=3D/usr --bindir=3D/usr/bin --sbindir=3D/usr/sbin --sysconfdir=3D/etc --datadir=3D/usr/share --includedir=3D/usr/include --libdir=3D/usr/lib64 --libexecdir=3D/usr/libexec --localstatedir=3D/var --sharedstatedir=3D/var/lib --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-dbus --with-gif --with-jpeg --with-png= --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=3Dgtk3 --with-gpm=3Dno build_alias=3Dx86_64-redhat-linux-gnu host_alias=3Dx86_64-redhat-linux-gnu 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector-strong --param=3Dssp-buffer-size=3D4 -grecord-gcc-switches -m64 -mtune=3Dgeneric' 'LDFLAGS=3D-Wl,-z,relro '' Important settings: value of $LC_COLLATE: C value of $LC_CTYPE: en_GB.UTF-8 value of $LC_MESSAGES: en_GB.UTF-8 value of $LC_MONETARY: en_GB.UTF-8 value of $LC_NUMERIC: en_GB.UTF-8 value of $LC_TIME: en_GB.UTF-8 value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Fundamental Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: p C-a ESC f DEL DEL DEL DEL c a t DEL DEL DEL e c h=20 o SPC ' # ! / b i n / s h ' RET e c h o SPC C-a C-k=20 r DEL l n SPC - s SPC / b i TAB f a TAB l TAB C-a C-k=20 r m SPC . g i TAB h o TAB p r e TAB - c TAB RET l n=20 SPC - s SPC / h DEL b i TAB f a TAB l TAB s e SPC .=20 g i TAB h o TAB p r e - c o TAB DEL DEL DEL DEL DEL=20 DEL DEL DEL RET e c h o SPC > a RET g t DEL i t SPC=20 a d d SPC a RET C-x C-f a RET h e l l o RET C-x C-s=20 C-x v =3D q C-g C-g ESC x s h e l l RET ESC > g i t SPC=20 s t a t u s RET C-x 1 c d SPC . . RET r m SPC - r f=20 SPC t e s t RET c d SPC t e s t C-a C-k m k d i r SPC=20 t e s t RET c d SPC t e s t RET g i t SPC i n i t RET=20 e c j h SPC DEL DEL DEL h SPC o > DEL DEL DEL o SPC=20 > a RET g i t SPC a d d SPC a RET C-x C-f a RET y e=20 s RET a C-x C-s C-x v =3D C-x b RET C-x 1 C-x b a RET=20 ESC x r e p o r t SPC e SPC b RET Recent messages: Finding changes in /home/eda/test/a... vc-do-command: Running git --no-pager diff-index --exit-code -p HEAD -- a= ...FAILED (status 128) call-interactively: Buffer is read-only: # Quit [2 times] Mark set ~=20 ~/test=20 Saving file /home/eda/test/a... Wrote /home/eda/test/a Finding changes in /home/eda/test/a... vc-do-command: Running git --no-pager diff-index --exit-code -p HEAD -- a= ...FAILED (status 128) Load-path shadows: None found. Features: (shadow sort emacsbug sendmail apropos vc-bzr vc-sccs vc-svn vc-cvs vc-rcs rect macros debug network-stream starttls tls mail-extr etags sh-script smie executable smerge-mode edmacro kmacro sql view mule-util python json dired tabify imenu man help-mode log-view diff-mode vc vc-dispatcher cus-edit wid-edit cus-start cus-load perl-mode dabbrev nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok ffap thingatpt url-parse auth-source eieio eieio-core gnus-util password-cache url-vars misearch multi-isearch vc-git pcmpl-unix xterm time-date log-edit easy-mmode message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log server csharp-mode advice help-fns byte-opt bytecomp byte-compile cconv cc-langs cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs zoom-frm frame-cmds frame-fns cl-macs avoid cl gv cl-loaddefs cl-lib compile shell pcomplete comint ring ansi-color tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 2123160 189079) (symbols 48 30370 0) (miscs 40 1280 7066) (strings 32 74802 19252) (string-bytes 1 3893095) (vectors 16 42168) (vector-slots 8 1773808 319851) (floats 8 1683 1258) (intervals 56 365598 3016) (buffers 960 190) (heap 1024 107029 5604)) Please ignore autogenerated disclaimer below this point. This email is intended only for the person to whom it is addressed and may= contain confidential information. Any retransmission, copying, disclosure= or other use of, this information by persons other than the intended reci= pient is prohibited. If you received this email in error, please contact t= he sender and delete the material. This email is for information only and = is not intended as an offer or solicitation for the purchase or sale of an= y financial instrument. Wadhwani Asset Management LLP is a Limited Liabili= ty Partnership registered in England (OC303168) with registered office at = 40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regul= ated by the Financial Conduct Authority. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 31 11:27:10 2015 Received: (at control) by debbugs.gnu.org; 31 Jul 2015 15:27:10 +0000 Received: from localhost ([127.0.0.1]:35952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLCDG-0006MS-3j for submit@debbugs.gnu.org; Fri, 31 Jul 2015 11:27:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42847) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLCDD-0006MK-Uf for control@debbugs.gnu.org; Fri, 31 Jul 2015 11:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLCD6-0008VB-0U for control@debbugs.gnu.org; Fri, 31 Jul 2015 11:27:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLCD5-0008V7-Tp for control@debbugs.gnu.org; Fri, 31 Jul 2015 11:26:59 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZLCD5-0005UQ-Ly for control@debbugs.gnu.org; Fri, 31 Jul 2015 11:26:59 -0400 Subject: control message for bug 21166 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Fri, 31 Jul 2015 11:26:59 -0400 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) found 21166 24.5 severity 21166 minor tag 21166 confirmed From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 31 13:25:41 2015 Received: (at 21166) by debbugs.gnu.org; 31 Jul 2015 17:25:41 +0000 Received: from localhost ([127.0.0.1]:36015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLE3x-0003jz-9O for submit@debbugs.gnu.org; Fri, 31 Jul 2015 13:25:41 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:35015) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLE3s-0003jp-Pv for 21166@debbugs.gnu.org; Fri, 31 Jul 2015 13:25:38 -0400 Received: by wibxm9 with SMTP id xm9so42905140wib.0 for <21166@debbugs.gnu.org>; Fri, 31 Jul 2015 10:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=imf2lvVTGu65ejgdeQGplNBgxCYOXyEFyMTwOXpAGP8=; b=p9UaEDE07R89y6CQK3cJM6GEg7X9QqTLNUe6P2/fsAC01mKNo547wOG91G5RGcc0m2 jO1UZvwvgd2ygFh63gIwc7XDrxgtkZShTPDNaLd1Exz8R0FTPrPvqbqSMoNyMnSsShmv fEP1YIGxa826LYBkgDm5f/HBEUGGz4zQ6Bqe6f4lQDnY7Vne5SM+5FrqYLMwutom5F7v gF8yP+3UsMl0iBTeldVJiiZDzeRt6BbHEhH7BL6kCmocdqWGD2y3YKBHHpb5EaZ4eMT6 cKDjZI5F1ou8rrAnZoUqsIv6WQIjU8xryFoOU3MjJqnNcnrqCXW+M17qdW/q9Y4lH2Tp JBvw== X-Received: by 10.194.100.42 with SMTP id ev10mr7738666wjb.50.1438363536019; Fri, 31 Jul 2015 10:25:36 -0700 (PDT) Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id fh3sm5445219wib.20.2015.07.31.10.25.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 10:25:35 -0700 (PDT) Subject: Re: bug#21166: 24.4; vc-mode and git error on newly added file to new repository To: Ed Avis , 21166@debbugs.gnu.org References: <7E039918541B4C4183BFDB8F015C743032E5C24D@WCL-EXCH02.wcl.local> From: Dmitry Gutov Message-ID: <55BBAF8D.90805@yandex.ru> Date: Fri, 31 Jul 2015 20:25:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 MIME-Version: 1.0 In-Reply-To: <7E039918541B4C4183BFDB8F015C743032E5C24D@WCL-EXCH02.wcl.local> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21166 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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@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. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 31 13:27:17 2015 Received: (at 21166) by debbugs.gnu.org; 31 Jul 2015 17:27:17 +0000 Received: from localhost ([127.0.0.1]:36019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLE5T-0003ma-Ng for submit@debbugs.gnu.org; Fri, 31 Jul 2015 13:27:16 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.152]:15836) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLE5Q-0003mK-JQ for 21166@debbugs.gnu.org; Fri, 31 Jul 2015 13:27:14 -0400 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 3D/F7-14422-FEFABB55; Fri, 31 Jul 2015 17:27:11 +0000 X-Env-Sender: eda@waniasset.com X-Msg-Ref: server-4.tower-206.messagelabs.com!1438363631!25052951!1 X-Originating-IP: [80.169.169.167] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=waniasset.com,-,- X-VirusChecked: Checked Received: (qmail 8940 invoked from network); 31 Jul 2015 17:27:11 -0000 Received: from unknown (HELO WCL-EXCHCAS02.wcl.local) (80.169.169.167) by server-4.tower-206.messagelabs.com with AES128-SHA encrypted SMTP; 31 Jul 2015 17:27:11 -0000 Received: from WCL-EXCH02.wcl.local ([169.254.1.57]) by WCL-EXCHCAS02.wcl.local ([149.85.127.102]) with mapi id 14.03.0123.003; Fri, 31 Jul 2015 18:27:10 +0100 From: Ed Avis To: "'dgutov@yandex.ru'" , "'21166@debbugs.gnu.org'" <21166@debbugs.gnu.org> Subject: Re: bug#21166: 24.4; vc-mode and git error on newly added file to new repository Thread-Topic: bug#21166: 24.4; vc-mode and git error on newly added file to new repository Thread-Index: AdDLnrzz5kFiFpc+QBSz1E14nD58swADsjyAAAIm8LQ= Date: Fri, 31 Jul 2015 17:27:10 +0000 Message-ID: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local> In-Reply-To: <55BBAF8D.90805@yandex.ru> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [149.85.127.28] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21166 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) I guess you don't have to add an extra process call but just check for thi= s error message, and if so, show the diff as from an empty tree.=20 This email is intended only for the person to whom it is addressed and may= contain confidential information. Any retransmission, copying, disclosure= or other use of, this information by persons other than the intended reci= pient is prohibited. If you received this email in error, please contact t= he sender and delete the material. This email is for information only and = is not intended as an offer or solicitation for the purchase or sale of an= y financial instrument. Wadhwani Asset Management LLP is a Limited Liabili= ty Partnership registered in England (OC303168) with registered office at = 40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regul= ated by the Financial Conduct Authority. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 31 13:44:22 2015 Received: (at 21166) by debbugs.gnu.org; 31 Jul 2015 17:44:22 +0000 Received: from localhost ([127.0.0.1]:36029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLEM1-0004Bd-On for submit@debbugs.gnu.org; Fri, 31 Jul 2015 13:44:22 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:34654) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZLEM0-0004BU-4h for 21166@debbugs.gnu.org; Fri, 31 Jul 2015 13:44:20 -0400 Received: by wibud3 with SMTP id ud3so66759141wib.1 for <21166@debbugs.gnu.org>; Fri, 31 Jul 2015 10:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=aN9nfWnF8v1HdqfMLph2l8CmEOSAOCG9X3BSdcTaXR8=; b=VUuSONUplC/XfXAOKVfyjTsXsD/vlEyTg6T81LotNmAFhwCkNU3NYcYqyo+G1+k+ti AI8zYU3Rho9DrhGmV2MUCPfHWuW2pey3XgEzDuFGm6DVJpm7bIbX0ClRSor8921aL8q8 DgDVhEjUVO3x3UEC0kKJcXsabnVoaHEQgZvTylS/ln+EOuO+wIWPxnmdlTo/rVgaJoOE 6UlzKac4UyRK4q3cKyOZj643w13kx1sC7RzMETisOOWmoHhpBm2A2FLRuCt7bsMxF9oB WEzKHNnc/xNDfXjVW3LWdJ6oOxMHXgzqM0C+StxLByKZGp4i0zNI4NGFYF2Nz2WUMMtF CzJg== X-Received: by 10.194.2.9 with SMTP id 9mr7890514wjq.95.1438364659404; Fri, 31 Jul 2015 10:44:19 -0700 (PDT) Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id x6sm5553615wiy.6.2015.07.31.10.44.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jul 2015 10:44:18 -0700 (PDT) Subject: Re: bug#21166: 24.4; vc-mode and git error on newly added file to new repository To: Ed Avis , 21166@debbugs.gnu.org References: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local> From: Dmitry Gutov Message-ID: <55BBB3F0.30709@yandex.ru> Date: Fri, 31 Jul 2015 20:44:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Thunderbird/40.0 MIME-Version: 1.0 In-Reply-To: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21166 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 07/31/2015 08:27 PM, Ed Avis wrote: > I guess you don't have to add an extra process call but just check for this error message, and if so, show the diff as from an empty tree. That's a good point, but doing an extra process call depending on the result of the first is also non-trivial here, because the first call is often asynchronous, and we handle those in a not particularly composable way. For instance, this patch doesn't work reliably: diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 9522328..b556de1 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1032,13 +1032,18 @@ or BRANCH^ (where \"^\" can be repeated)." command "--exit-code" (append (vc-switches 'git 'diff) - (list "-p" (or rev1 "HEAD") rev2 "--"))) + (list "-p" rev1 rev2 "--"))) (vc-git-command (or buffer "*vc-diff*") 1 files "difftool" "--exit-code" "--no-prompt" "-x" (concat "diff " (mapconcat 'identity (vc-switches nil 'diff) " ")) - rev1 rev2 "--")))) + rev1 rev2 "--")) + (vc-run-delayed + (when (looking-at "fatal: bad revision 'HEAD'") + (let ((inhibit-read-only t)) + (erase-buffer) + (vc-git-diff files "4b825dc642cb6eb9a060e54bf8d69288fbee4904" rev2 buffer async)))))) (defun vc-git-revision-table (_files) ;; What about `files'?!? --Stef From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 04 10:58:16 2015 Received: (at 21166) by debbugs.gnu.org; 4 Aug 2015 14:58:16 +0000 Received: from localhost ([127.0.0.1]:39626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMdfU-00024R-Bm for submit@debbugs.gnu.org; Tue, 04 Aug 2015 10:58:16 -0400 Received: from mail1.bemta3.messagelabs.com ([195.245.230.167]:36100) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZMdfR-00024F-2j for 21166@debbugs.gnu.org; Tue, 04 Aug 2015 10:58:14 -0400 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 10/DD-16965-403D0C55; Tue, 04 Aug 2015 14:58:12 +0000 X-Env-Sender: eda@waniasset.com X-Msg-Ref: server-5.tower-31.messagelabs.com!1438700291!32279743!1 X-Originating-IP: [213.212.127.155] X-StarScan-Received: X-StarScan-Version: 6.13.16; banners=waniasset.com,-,- X-VirusChecked: Checked Received: (qmail 18268 invoked from network); 4 Aug 2015 14:58:11 -0000 Received: from unknown (HELO WCL-EXCHCAS03.wcl.local) (213.212.127.155) by server-5.tower-31.messagelabs.com with AES128-SHA encrypted SMTP; 4 Aug 2015 14:58:11 -0000 Received: from WCL-EXCH02.wcl.local ([169.254.1.57]) by WCL-EXCHCAS03.wcl.local ([149.85.126.212]) with mapi id 14.03.0123.003; Tue, 4 Aug 2015 15:58:11 +0100 From: Ed Avis To: 'Dmitry Gutov' , "21166@debbugs.gnu.org" <21166@debbugs.gnu.org> Subject: RE: bug#21166: 24.4; vc-mode and git error on newly added file to new repository Thread-Topic: bug#21166: 24.4; vc-mode and git error on newly added file to new repository Thread-Index: AdDLnrzz5kFiFpc+QBSz1E14nD58swADsjyAAAIm8LT///QDAP/51Ijw Date: Tue, 4 Aug 2015 14:58:10 +0000 Message-ID: <7E039918541B4C4183BFDB8F015C743032E5E6EC@WCL-EXCH02.wcl.local> References: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local> <55BBB3F0.30709@yandex.ru> In-Reply-To: <55BBB3F0.30709@yandex.ru> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [149.85.127.168] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21166 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) 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 befor= e or after. --=20 Ed Avis This email is intended only for the person to whom it is addressed and may= contain confidential information. Any retransmission, copying, disclosure= or other use of, this information by persons other than the intended reci= pient is prohibited. If you received this email in error, please contact t= he sender and delete the material. This email is for information only and = is not intended as an offer or solicitation for the purchase or sale of an= y financial instrument. Wadhwani Asset Management LLP is a Limited Liabili= ty Partnership registered in England (OC303168) with registered office at = 40 Berkeley Square, 3rd Floor, London, W1J 5AL. It is authorised and regul= ated by the Financial Conduct Authority. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 05:04:25 2020 Received: (at 21166) by debbugs.gnu.org; 25 Aug 2020 09:04:25 +0000 Received: from localhost ([127.0.0.1]:60268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAUsT-0007wy-Cs for submit@debbugs.gnu.org; Tue, 25 Aug 2020 05:04:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) 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=; 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 ) id 1kAUsD-0003Vv-0O; Tue, 25 Aug 2020 11:04:14 +0200 From: Lars Ingebrigtsen To: Ed Avis Subject: Re: bug#21166: 24.4; vc-mode and git error on newly added file to new repository References: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local> <55BBB3F0.30709@yandex.ru> <7E039918541B4C4183BFDB8F015C743032E5E6EC@WCL-EXCH02.wcl.local> 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" Date: Tue, 25 Aug 2020 11:04:07 +0200 In-Reply-To: <7E039918541B4C4183BFDB8F015C743032E5E6EC@WCL-EXCH02.wcl.local> (Ed Avis's message of "Tue, 4 Aug 2015 14:58:10 +0000") Message-ID: <87ft8bdrlk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Ed Avis 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 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21166 Cc: "21166@debbugs.gnu.org" <21166@debbugs.gnu.org>, 'Dmitry Gutov' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ed Avis 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 23:08:00 2020 Received: (at 21166) by debbugs.gnu.org; 11 Oct 2020 03:08:00 +0000 Received: from localhost ([127.0.0.1]:38955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRRiJ-0007Sb-QZ for submit@debbugs.gnu.org; Sat, 10 Oct 2020 23:08:00 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRRiH-0007SI-Ah for 21166@debbugs.gnu.org; Sat, 10 Oct 2020 23:07:57 -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=zQregvt3V8LaBzEwdWTSTEx36oTj0MLXHd5tcx6fKr0=; b=Qn6MN+fUftabhvX0LWWGRMndFD j+pmDadYy5QGaHNjoAqOdblHTkJ3dEl5RfMO926Ng9sZs59PYmeLtDwuOF6ESRQFzLNZLlEZ0Lhbb sgnBx9tx5+QMfidAQytU6WTGJ20IqyMJkxWQEot8VMRmwyAg4aue6ZqhPUBGkYwiREZQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRRi8-0004n3-SF; Sun, 11 Oct 2020 05:07:51 +0200 From: Lars Ingebrigtsen To: Ed Avis Subject: Re: bug#21166: 24.4; vc-mode and git error on newly added file to new repository References: <7E039918541B4C4183BFDB8F015C743032E5C672@WCL-EXCH02.wcl.local> <55BBB3F0.30709@yandex.ru> <7E039918541B4C4183BFDB8F015C743032E5E6EC@WCL-EXCH02.wcl.local> <87ft8bdrlk.fsf@gnus.org> X-Now-Playing: Cat Power's _The Greatest_: "Willie" Date: Sun, 11 Oct 2020 05:07:47 +0200 In-Reply-To: <87ft8bdrlk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Aug 2020 11:04:07 +0200") Message-ID: <87362lsbng.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > 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 re [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21166 Cc: 'Dmitry Gutov' , "21166@debbugs.gnu.org" <21166@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > 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. No further comments in six weeks, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 10 23:08:08 2020 Received: (at control) by debbugs.gnu.org; 11 Oct 2020 03:08:08 +0000 Received: from localhost ([127.0.0.1]:38959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRRiS-0007TU-2P for submit@debbugs.gnu.org; Sat, 10 Oct 2020 23:08:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRRiQ-0007Sj-Jo for control@debbugs.gnu.org; Sat, 10 Oct 2020 23:08:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mKdAUH4q8WN4/kTjkMTjA+nWA7D3Jad8LrTT1Cr3WfM=; b=AwtljybxFC2I1mcRgholI0T8HZ JWYeZVfefUWK8jjpyran42V5MW/X7V0bYhZpcJlifIyII7LAX9Wra4zzQbvH/mcGU+vWlti/EMvTa FZoSdg1TPg9J+4SBerKGEuKrI1TtyLzD66u6gFYK6zdkiFTdzzt4Ssuen2cE46R4A87k=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRRiJ-0004nF-0V for control@debbugs.gnu.org; Sun, 11 Oct 2020 05:08:01 +0200 Date: Sun, 11 Oct 2020 05:07:58 +0200 Message-Id: <871ri5sbn5.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #21166 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 21166 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 21166 quit From unknown Mon Jun 23 04:15:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 08 Nov 2020 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator