From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#59011: 29.0.50; change to vc-git-working-revision breaks vc-git-mode-line-string Date: Fri, 04 Nov 2022 16:34:38 +0000 Message-ID: <87leoq7k69.fsf@posteo.net> References: <875yfvw6pv.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18058"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59011@debbugs.gnu.org To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 17:35:37 2022 Return-path: 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 ) id 1oqzfN-0004QL-7U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 17:35:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqzf0-0003WR-Rv; Fri, 04 Nov 2022 12:35:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqzeo-0003T1-AL for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqzeo-0003GE-1g for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqzen-0003oJ-Sm for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2022 16:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59011 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166757969614633 (code B ref -1); Fri, 04 Nov 2022 16:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Nov 2022 16:34:56 +0000 Original-Received: from localhost ([127.0.0.1]:54669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqzei-0003nw-C9 for submit@debbugs.gnu.org; Fri, 04 Nov 2022 12:34:56 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqzee-0003nm-B4 for submit@debbugs.gnu.org; Fri, 04 Nov 2022 12:34:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqzee-0003Lx-0f for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:34:52 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqzeb-0003FA-AS for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 12:34:51 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9C0D0240026 for ; Fri, 4 Nov 2022 17:34:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667579682; bh=Udqg0LcbjgYxp0gVPC4e/z4b7j14fF5reL3BJGVlaT4=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=RTGenQYQOScfn8JsORO9LG+1+h1bX/AwS3u2AbqFRh/DokPpUT2dIstHB53BkHgDI xryZtuuT3s/ZVbTvKcshfjSyUIXXS0t3K9AttKeSgor6ZdCVABPG7SgEE7E8Oxq16g sGtSqP3GN8fX9RK6iSDnSmU4Jg7vBZYKtd3zNSUr1tUMxB+UWiJ0ugUArdr4xjk7g8 Mw9XylkeRNgOTXrE6F9v2p7ClznXBCb6lAh2F84zkNnF6ade222RUfcseMZxJjhKhy iBI0pGiHgbDIaaQdm2AX/tO2R278pDZv/MtxlIjnme/Z91mgl90/ne518PZhED1cbG k41KxbspZ71Yg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N3mS02Z69z9rxV; Fri, 4 Nov 2022 17:34:40 +0100 (CET) In-Reply-To: <875yfvw6pv.fsf@bernoul.li> (Jonas Bernoulli's message of "Fri, 04 Nov 2022 07:53:48 +0100") Autocrypt: addr=philipk@posteo.net; keydata= mQGNBGLfygUBDADVznbke6w0n9nE42xb+ZggbBy0IYRkkru/K+NA67523YTl2DoR2a5OMW90w7L9 KDtX2Mp34JN/6jVOSVC07VUbHVu6/exoGKixkiTpGhBPy5tUUJoxQKqLrzVQhN3fIyvg1oyHXKZm QGkUeevV0wjj4++xfjmcP235YvDh3TF8HC9t5KxIQIbhWnQm4ZyDkpWWS2CmdNttlj2+eH+51WLL bgx2bcwTmqrs079Q3hgF3yh44bBEmp9MgFjiZldOY2my0/ZSeucRxYmiM0vbJEBQgZV/MvA3gTxe 7ibV3ii7AyoYA8FiFDP98S/R2y5Nfq3ez9B7qeqtpSNseQHOU7h8Y5VV01a71ZszENAmbbwsldb9 j+HRLke7rn6mswDZl1qA/9ZFRzliFOdQtS1878XjraY+h5jfjvxaFVK23prGGVrrKv0LPWavoFUr nsjeHEZhYezBKhC2PwvRtXm01S3rkNbwm9pj0tfLSDW+1pT+6eZWptfQCXF2oEvgfKSTASUAEQEA AbQmUGhpbGlwIEthbHVkZXJjaWMgPHBoaWxpcGtAcG9zdGVvLm5ldD6JAdQEEwEKAD4WIQRxJuHe LwzjXHcL7QHyw8xRPbifZgUCYt/KBQIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAK CRDyw8xRPbifZkH+DACmCKmhrYgcv2i6dj3vRCVINaLtKUODTna/wAmP20WRKPhqvqvKNUx/wzpT aZrXIxpxOU2xawRWeHhWUktxS+W9L3xTACeR0gf5gomCxD9RuBTIohzWDkQt5rk8QwLqx5rAy5 Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247094 Archived-At: Jonas Bernoulli writes: > Since 307ad210040251ea0de2e7f453350c4497bda874 `vc-git-working-revision' > may return the name of a reference (aka symbolic commit) instead of the > full sha1 hash, as it used to always do. > > When that name is shorter than seven characters, then that change breaks > `vc-git-mode-line-string', which expects to be able to extract the first > seven characters of the string returned by `vc-git-working-revision'. This was already touched on in bug#58709, and I believe it is best to revert the change for now. The motivation for the change was to make selecting revisions for the new `vc-prepare-patch' command, but perhaps it would be better to handle the issue somewhere else like in vc-*-revision-table. > (By the way, it is not correct to abbreviate a commit hash to the first > N characters using (substring hash 0 N). Even in a small repository > there is a risk that such a naive abbreviation is ambiguous. Instead of > doing that, one should use Git to perform the abbreviation; that way one > can request an abbreviation of a certain length, and Git will comply -- > unless doing that would be ambiguous, in which case it returns a longer > abbreviation.) If this is only done in the mode line, then I don't think there is too much harm in doing so (it isn't fed back into git at any point), though using a proper abbreviation would technically preferable.