From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21457: 25.0.50; vc-test-git03-working-revision test fails Date: Sat, 12 Sep 2015 18:03:38 +0300 Message-ID: <83h9mzbrxx.fsf@gnu.org> References: <83d1xp4cn0.fsf@gnu.org> <01lhcc3day.fsf@fencepost.gnu.org> <83mvws2eov.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1442070270 30233 80.91.229.3 (12 Sep 2015 15:04:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Sep 2015 15:04:30 +0000 (UTC) Cc: 21457@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 12 17:04:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZamLZ-0005gJ-JD for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Sep 2015 17:04:09 +0200 Original-Received: from localhost ([::1]:32788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZamLY-0007HR-Tu for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Sep 2015 11:04:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZamLV-0007GV-IM for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2015 11:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZamLS-0000GZ-Bp for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2015 11:04:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZamLS-0000G4-8Q for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2015 11:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZamLR-0005GY-NB for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2015 11:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Sep 2015 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21457-submit@debbugs.gnu.org id=B21457.144207022820223 (code B ref 21457); Sat, 12 Sep 2015 15:04:01 +0000 Original-Received: (at 21457) by debbugs.gnu.org; 12 Sep 2015 15:03:48 +0000 Original-Received: from localhost ([127.0.0.1]:58479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZamLE-0005G7-5i for submit@debbugs.gnu.org; Sat, 12 Sep 2015 11:03:48 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:41710) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZamLB-0005Fx-Bi for 21457@debbugs.gnu.org; Sat, 12 Sep 2015 11:03:46 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NUK00D00IY05600@mtaout24.012.net.il> for 21457@debbugs.gnu.org; Sat, 12 Sep 2015 17:56:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NUK00DV9K5MK820@mtaout24.012.net.il>; Sat, 12 Sep 2015 17:56:11 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106451 Archived-At: > From: Andreas Schwab > Cc: Glenn Morris , 21457@debbugs.gnu.org > Date: Sat, 12 Sep 2015 11:42:59 +0200 > > Eli Zaretskii writes: > > > The patches below make this work for me. The first one should > > probably be applied regardless, as without it vc-git--rev-parse is not > > safe to call in some borderline cases. > > > > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el > > index 8a0f554..af2b39f 100644 > > --- a/lisp/vc/vc-git.el > > +++ b/lisp/vc/vc-git.el > > @@ -1137,7 +1137,9 @@ (defun vc-git--rev-parse (rev) > > (with-temp-buffer > > (and > > (vc-git--out-ok "rev-parse" rev) > > - (buffer-substring-no-properties (point-min) (+ (point-min) 40))))) > > + (buffer-substring-no-properties (point-min) > > + (min (1- (point-max)) > > + (+ (point-min) 40)))))) > > Why does vc-git--out-ok return true when git rev-parse failed? Good question, I will look into it soon. Do you know whether "HEAD" is indeed what the latest Git should return in this case, though? The original test expected "master". Was this some change in Git? I cannot find anything about this in Google, but that's a small wonder as including "HEAD" in the query brings in a lot of useless clutter.