From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jonas Bernoulli 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 07:53:48 +0100 Message-ID: <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="40496"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic To: 59011@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 04 07:55:34 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 1oqqc2-000AML-IZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Nov 2022 07:55:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqqbY-0005vW-Mq; Fri, 04 Nov 2022 02:55:04 -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 1oqqbW-0005v0-D7 for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 02:55:02 -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 1oqqbW-00074A-3r for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 02:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqqbV-000880-Rw for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 02:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Nov 2022 06:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59011 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166754484531170 (code B ref -1); Fri, 04 Nov 2022 06:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Nov 2022 06:54:05 +0000 Original-Received: from localhost ([127.0.0.1]:51466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqqaa-00086f-S6 for submit@debbugs.gnu.org; Fri, 04 Nov 2022 02:54:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqqaY-00086X-49 for submit@debbugs.gnu.org; Fri, 04 Nov 2022 02:54:03 -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 1oqqaX-0005jT-Ly for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 02:54:01 -0400 Original-Received: from mail.hostpark.net ([212.243.197.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqqaV-00070F-Pe for bug-gnu-emacs@gnu.org; Fri, 04 Nov 2022 02:54:01 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id C9F4C16614; Fri, 4 Nov 2022 07:53:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :subject:subject:from:from:received:received; s=sel2011a; t= 1667544830; bh=566RKC+zXrv3j2yo/izQEcmdPetNmrYaPudFJYgQ6nE=; b=b ErdoPRbjwn06Iki1zZjG/+jGc+syovFSAKqXIm5/aO7eySf//wrP3fRMoK4bS0TB uy1gOhbOZLJaPpXOYNvrEaZi3KBN8H9tn/F11+FEoXHxDpPyLGZNb/mLKUUHbWRJ WcikLIMqjYcPFXzU+iZs/+c2o4B/bjakcP0NP03j8w= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Original-Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id qxSIyr37qApF; Fri, 4 Nov 2022 07:53:50 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 9B9FD1637E; Fri, 4 Nov 2022 07:53:50 +0100 (CET) Received-SPF: none client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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:247043 Archived-At: 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'. (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.)