From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#14459: git vc-annotate fails in detached HEAD state Date: Tue, 28 May 2013 03:14:04 +0400 Message-ID: <87bo7w583n.fsf@yandex.ru> References: <87wqqopluu.wl%claudio.bley@gmail.com> <87hahs19iy.fsf@yandex.ru> <87ppwcgc0t.wl%claudio.bley@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369696501 6802 80.91.229.3 (27 May 2013 23:15:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 May 2013 23:15:01 +0000 (UTC) Cc: 14459-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 28 01:14:59 2013 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 1Uh6d0-0003pR-7K for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 May 2013 01:14:58 +0200 Original-Received: from localhost ([::1]:50453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uh6cz-00047M-DZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 May 2013 19:14:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uh6ct-00047F-Gc for bug-gnu-emacs@gnu.org; Mon, 27 May 2013 19:14:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uh6cp-0000Hm-VC for bug-gnu-emacs@gnu.org; Mon, 27 May 2013 19:14:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uh6cp-0000HS-Ri for bug-gnu-emacs@gnu.org; Mon, 27 May 2013 19:14:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Uh6e2-0004NS-9j for bug-gnu-emacs@gnu.org; Mon, 27 May 2013 19:16:02 -0400 Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 May 2013 23:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 14459 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 14459@debbugs.gnu.org, dgutov@yandex.ru, claudio.bley@gmail.com Original-Received: via spool by 14459-done@debbugs.gnu.org id=D14459.136969653116743 (code D ref 14459); Mon, 27 May 2013 23:16:02 +0000 Original-Received: (at 14459-done) by debbugs.gnu.org; 27 May 2013 23:15:31 +0000 Original-Received: from localhost ([127.0.0.1]:36906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uh6dX-0004Lz-3F for submit@debbugs.gnu.org; Mon, 27 May 2013 19:15:31 -0400 Original-Received: from mail-la0-f41.google.com ([209.85.215.41]:54921) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uh6dU-0004Lg-Lw for 14459-done@debbugs.gnu.org; Mon, 27 May 2013 19:15:30 -0400 Original-Received: by mail-la0-f41.google.com with SMTP id ee20so6889087lab.14 for <14459-done@debbugs.gnu.org>; Mon, 27 May 2013 16:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:x-antivirus:x-antivirus-status; bh=km1a2aSeSDxns+nG7r3Nx+jpk69fxwNLBByzm7RsMNc=; b=j3Z9bGL6jGBcUZQ1mblwWSy3PzP8kkzqQgLDsaNU2p4UW08Zw/76OJhxt5Cv0KNkLc oQQqnRv46c/vmZfWy7yYLeEHYl2Nxhf4TszEZWDoAnRdIS2xWZC1YGava6/ZMeZYPGoy Zj7Gvi9z5cGHFR/l4Xh+5RSNQ0WV4zMIb47NbVEaFsIIWAD0juMBp9to99gyuiNPm8Cg nJuBxuLbWbD1nJkzYeEjkMi3h/Ja6+6u9nBRxgUQoadyruCiHuOAK8AZ+H/gJLNuAd8r qr3CX5t9KSu8i0tKdlDmvW4MekDKP2IqCFeWLsDZeNN/ebBwXygH4XJW1GrmJ4VWFIcr h/5g== X-Received: by 10.112.181.163 with SMTP id dx3mr15074002lbc.126.1369696447751; Mon, 27 May 2013 16:14:07 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPSA id t4sm12319201lbe.7.2013.05.27.16.14.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 May 2013 16:14:06 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 27 May 2013 11:10:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130527-1, 28.05.2013), Outbound message X-Antivirus-Status: Clean X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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:74608 Archived-At: Version: 24.4 Claudio Bley writes: > Yes, this is way better than what I've come up with. But shouldn't we > also use the "--short[=n]" option to restrict the length of the > revision string as it is displayed in the modeline? I think 40 chars > is a bit long a text taking up precious space in my modeline. Thanks, I missed that. And also the fact that `vc-git-mode-line-string' relied on the non-standard return value (empty string) to determine whether it should add the appropriate help-echo, ("No current branch (detached HEAD)"). I've checked in a more comprehensive patch, using the same help-echo format in both cases. Stefan Monnier writes: > The shortening could also be limited to the modeline. Done. Shortening the mode-line format in `vc-git-mode-line-string' wasn't an obvious solution for me, but it seems to work well enough.