From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73232: [PATCH] Allow vc-diff to suggest a default revision in vc-dir Date: Fri, 13 Sep 2024 19:10:52 +0300 Message-ID: <864j6jjzzn.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21909"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73232@debbugs.gnu.org, juri@linkov.net To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 13 18:12:09 2024 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 1sp8u0-0005VD-2J for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Sep 2024 18:12:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sp8to-0004TD-GN; Fri, 13 Sep 2024 12:11:56 -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 1sp8tm-0004Sr-MV for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 12:11:55 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sp8tm-00063S-9D for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 12:11:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=MYYXB5GWUCJDkeZCbBVzqKQJtt8fiwbPo9DQziDyF6s=; b=DXFOgqhu04B22ektFz9z4OSACluh56fIXeLfTtWFlXyJq87Cj8PIVcts8EG/BkE9SPN9ve5DQlabLVz1xgBdtaTIkMg1/11bVfKPxMkS46fOUh9Pz4M6w650IRjLT7acjoZoK8EAkVQWAG9WtR5B+W4hOo9sPqDSBIv+k4rNkFo0jxa51PX1R5MTQoXnGxUETSF2Hixn2EZcblmHQCs7UBrEkylhgMSoKflz27Vt7e8R1s6zS0A/UNLure1if1dm11HToBorstmHIS5LFu4zLY1J3AznhopDQ4AltbPjhdMAHd/vq5vuxR1LwuRZA8GaMAWzBWjpoO7FTOFe5z3d1A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sp8tu-0000L8-HD for bug-gnu-emacs@gnu.org; Fri, 13 Sep 2024 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2024 16:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73232 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73232-submit@debbugs.gnu.org id=B73232.17262438901239 (code B ref 73232); Fri, 13 Sep 2024 16:12:02 +0000 Original-Received: (at 73232) by debbugs.gnu.org; 13 Sep 2024 16:11:30 +0000 Original-Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sp8tN-0000Jv-OA for submit@debbugs.gnu.org; Fri, 13 Sep 2024 12:11:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sp8tM-0000JX-2X for 73232@debbugs.gnu.org; Fri, 13 Sep 2024 12:11:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sp8t5-00060t-6r; Fri, 13 Sep 2024 12:11:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MYYXB5GWUCJDkeZCbBVzqKQJtt8fiwbPo9DQziDyF6s=; b=DG7rUtyyiGrp jZJHl+UlH4eNgb7XZLURgjonRcB4WAKEeGiFYTE0WZWUcsfHELu98IqTYmHlB+QcTSg4XS3Cpchh7 3QJ8Gpc1YE4qhBTwBEFsM20GhwhrfhewH5cmHCyJ/CBvj0L1Eahpf69zgC5ezgFEcdp9B8w1m/23V ex145kKYnBQo06mS+ifShyAZhdZeix6RKhChcnxUBFfiWRUWVvKVkWEzzSHiNqmAI150aoOU8fkpS aqUO0F0aKhWk0/S2fxfa8H9RLXGC88798P5jIuSyvWC/NjAm8xBgkOB9EyEt7F7Sop8SWCRBEtHgR TBORL/XNCvVG1WHycKxFQg==; In-Reply-To: (bug-gnu-emacs@gnu.org) 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291665 Archived-At: > Cc: Juri Linkov > Date: Fri, 13 Sep 2024 11:51:47 -0400 > From: Spencer Baugh via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > - ;; if it's a directory, don't supply any revision default > - ((file-directory-p first) > - nil) > ;; if the file is not up-to-date, use working revision as older revision > - ((not (vc-up-to-date-p first)) > - (setq rev1-default (vc-working-revision first))) > + ((not (and (file-directory-p first) (vc-up-to-date-p first))) > + (setq rev1-default (vc-working-revision first backend))) Doesn't this change the conditions under which we use vc-working-revision for regular files? Did you perhaps mean ((and (not (file-directory-p first)) (vc-up-to-date-p first)) instead?