From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#38044: 27.0.50; There should be an easier way to look at a specific vc commit Date: Thu, 21 Nov 2019 21:08:49 +0200 Message-ID: <215302ff-8252-1f6c-5f60-aaba01cd615f@yandex.ru> References: <87ftj5at1q.fsf@gnus.org> <87r22phsoj.fsf@gmx.net> <87bltslnpo.fsf@mail.linkov.net> <87d0dvmqu8.fsf@mail.linkov.net> <590e595e-8220-1c7e-bd4a-b2eb0968e289@yandex.ru> <87r226xl8m.fsf@mail.linkov.net> <24c56bca-8d7d-3a20-aeef-5d11f8a075e6@yandex.ru> <87pnhquo4k.fsf@mail.linkov.net> <6087186e-a444-0aac-e87d-596d2e36f0ce@yandex.ru> <877e3wub09.fsf@mail.linkov.net> <5ce7d4f0-3884-fd27-09dc-c38f01a19958@yandex.ru> <83zhgr26c3.fsf@gnu.org> <87blt7qxhz.fsf@mail.linkov.net> <837e3v1aae.fsf@gnu.org> <87y2warzv3.fsf@mail.linkov.net> <83r221xoll.fsf@gnu.org> <83a78pxenu.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="136980"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: larsi@gnus.org, stephen.berman@gmx.net, 38044@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 21 20:09:24 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iXrpU-000ZVT-Am for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Nov 2019 20:09:24 +0100 Original-Received: from localhost ([::1]:45342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXrpT-0001na-55 for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Nov 2019 14:09:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32984) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXrpB-0001aP-UD for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2019 14:09:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXrpA-0001Ca-I7 for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2019 14:09:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iXrpA-0001CP-Ei for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2019 14:09:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iXrp8-0008ED-Uu for bug-gnu-emacs@gnu.org; Thu, 21 Nov 2019 14:09:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Nov 2019 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38044 X-GNU-PR-Package: emacs Original-Received: via spool by 38044-submit@debbugs.gnu.org id=B38044.157436334031620 (code B ref 38044); Thu, 21 Nov 2019 19:09:02 +0000 Original-Received: (at 38044) by debbugs.gnu.org; 21 Nov 2019 19:09:00 +0000 Original-Received: from localhost ([127.0.0.1]:53345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrp5-0008Dv-Dh for submit@debbugs.gnu.org; Thu, 21 Nov 2019 14:08:59 -0500 Original-Received: from mail-wm1-f50.google.com ([209.85.128.50]:40941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrp3-0008Df-AA for 38044@debbugs.gnu.org; Thu, 21 Nov 2019 14:08:57 -0500 Original-Received: by mail-wm1-f50.google.com with SMTP id y5so4982828wmi.5 for <38044@debbugs.gnu.org>; Thu, 21 Nov 2019 11:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GH+nttOv+tLMKHliuc5zHxohoI7VfdnCa1fmahy2TRY=; b=BHp/aBS8zkKTAO2T3/M0uezg0jiOIajEgB9FOaaSSvUAg5/TvJ4KA+YIgXNjwFVkiU 0PluBMNnaUpb++mKIDENhZAdam0iqE7v41feLWoTewGZ90zkQfAQjRjaPTVaMCq4gRBD gN7q7goiSawhmJtvNDluy9WxIerSsjF1S7TTEjQyqN+QUVNBiR0astBFZkcunylt8GmP ICel42XBn9rt4LkDt93FP1QAsQhcHsw0Z6fnEYRYF7QdiVcEcX04efZZp7aJ5Pc45W4X evzPVJ5tUIHmKjR8XXccCnu+dYshd0Qpj/E4Ad1GV8wrhvZlkajLXmV5IqBcajJXHFal CiKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GH+nttOv+tLMKHliuc5zHxohoI7VfdnCa1fmahy2TRY=; b=Zw8fQSbT6bm9GMqGaBUwiCyHmWP4IizQEgiZPYFQ7TasgaxuhLsM8er+W9aXg2/Crb ETKA4xqOqm/NgGfq81Qs4sx5X4McWzqEqRm42vteujK3MzjxB///gNrCCfPISpiFEDDy Tgp9LIBf5K90dZA5ai2Ek57Dnc93+6np+K+Vo7F7P2ivhWVYfDSXZAistlUBjmL48GnC D7KUnf/Y2w6OQnHDVQ2DO3YVBoq/AR8dFLIsDhcWAAsKNu7lYuU6l7RzHxII8AZRKbfL NGpa9VNSk6b4vdBrFNIlfWqZvQk4P3YCNW7UrEuK5fS08bo4QmtzEXbe4+now2Cbr39a NBZA== X-Gm-Message-State: APjAAAU5HwoCnFXhoFTqV/YurXFjaymWka2D0/K9bhE73IZR/ZHPugjE veI9LjHyabTyftafbnBttmItGJnJ X-Google-Smtp-Source: APXvYqzzFCUy+RZPczBhhFkmpzxZFMcx5pCdBokDz0Zt//wy8LkkLXYQ5qCspAqmY9kooQm8Xg+4ig== X-Received: by 2002:a05:600c:299:: with SMTP id 25mr12429177wmk.50.1574363331141; Thu, 21 Nov 2019 11:08:51 -0800 (PST) Original-Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id 188sm623036wmz.13.2019.11.21.11.08.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2019 11:08:50 -0800 (PST) In-Reply-To: <83a78pxenu.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:172154 Archived-At: On 21.11.2019 20:33, Eli Zaretskii wrote: >> Cc: larsi@gnus.org, stephen.berman@gmx.net, 38044@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Thu, 21 Nov 2019 17:50:10 +0200 >> >> Okay, I see what you mean now: you're basically suggesting to tackle the >> new behavior (the one everybody wants apparently) on top the 'diff' >> backend action. Which can kind of work, but I don't see why we would >> make that choice. > > I think it's the logical place for such a command, because, as I said > before, in many VCSes a description of a revision _is_ the diffs of > that revision against its parent. That is how we always presented a > revision before Git. And "git show" also presents diffs, it just > prepends some meta-data to it. So it's actually a minor variation of > "diff". "As I said before", when a revision is created, we fill in a number of different fields, most importantly, the commit message. That's in every VCS except some ancient ones. So to show a revision means to show all that stuff. The fact that some VCS's command line doesn't provide an easy way to do this is incidental. >> Adding a new backend command is relatively cheap, and we won't force the >> backend implementation to try to reconcile incompatible arguments (e.g. >> REV1 that is not a parent of REV2 and SHOW-METADATA=t). > > I agree that adding a command is cheap. But it makes the system more > complex and harder to remember and make sense of. So IMO we should > only add a new class of commands if the command is radically different > from others. An awkward implementation is even harder to make sense of. And creating a function that does something different based on an optional argument is bad programming. Anyway, we could implement this new command using *zero* new backend actions. Even without calling 'git show'. >> I also think the current patch proposed by Juri is cleaner than the one >> that is required to implement your idea. > > I think the difference is very small, because the function Juri wrote > can simply be called from vc-diff given a special value of prefix arg. Does this make sense for anybody else here? For me, the diff command, even VCS diff, is about showing differences between file trees, or states of the file system. Not about describing one revision. >> Finally, "C-u C-u C-x v =" doesn't look semantic enough for me (revision >> != diff in my mind, at least not entirely). I think it would be nicer to >> have a new command, but opinions welcome on this. > > I think that's because you keep the command issued by the backend in > mind all the time, and that command is not "diff" for Git and > Mercurial. Not necessarily. And see above. > But the output is almost exactly that of "diff", so IMO > the mental model is simple and easy to remember. We all have our biases. You apparently dislike Git (VCS used by most of everybody these days, including our users) and prefer the way command line interfaces looked in previous systems. That's a valid preference, but it's unlikely to reflect the expectations of most of our users.