From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Merge-base alias for git vc-diff Date: Thu, 03 Jan 2019 21:44:05 +0000 Message-ID: <871s5t1knu.fsf@gmail.com> References: <87bm58ornb.fsf@mail.linkov.net> <92f058a4-ef98-725b-9603-5a671113dfaa@yandex.ru> <87lg4aak10.fsf@mail.linkov.net> <87o98zapae.fsf@mail.linkov.net> <7e8020d6-92df-a475-cbd7-98f42676a99b@yandex.ru> <877efl8pgj.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546551805 2577 195.159.176.226 (3 Jan 2019 21:43:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2019 21:43:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel , Stefan Monnier , Dmitry Gutov To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 03 22:43:21 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gfAls-0000ZN-5k for ged-emacs-devel@m.gmane.org; Thu, 03 Jan 2019 22:43:20 +0100 Original-Received: from localhost ([127.0.0.1]:58279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfAnz-0003XV-1g for ged-emacs-devel@m.gmane.org; Thu, 03 Jan 2019 16:45:31 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfAnI-0003VM-C2 for emacs-devel@gnu.org; Thu, 03 Jan 2019 16:44:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfAnE-0002Sc-AW for emacs-devel@gnu.org; Thu, 03 Jan 2019 16:44:48 -0500 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:50779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfAnD-0002Rk-Va for emacs-devel@gnu.org; Thu, 03 Jan 2019 16:44:44 -0500 Original-Received: by mail-wm1-x32b.google.com with SMTP id n190so30505566wmd.0 for ; Thu, 03 Jan 2019 13:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=brCSzH3Yj9YFk5AzY3Bq9IdGK1pVaTzuwUZ0Qo3mQ4o=; b=NwtTNHRU0Wh6lFRsSlNcFzK8GWqZgqQ4bJItjk5zFWge+nEGPOgiEK5sNjU3yuGa7t t+yapKfbPuW0QsVUdUzecexmGTgKg+gaB91vgxQvTfRmx+SX5AYL+REZMX9qfDfGWjTw SkrTW6nTy1/BdTW+hXJX4m2ZfU3g1mkcqXN0+cetDSMXR8Ae/vSEhM/oBQHAJJ0Wnffz hm0KmhlyIq8oqjjUvIBFieb2+c3GrNaY73r16DjR5ZO5RPuQio51p8PimW3zmbDPXtWb /bffHTmUwnzwTrfLo93us+R8O5ganzZH9dsjxAlsUFO0a2WkMD7xpgW/qI7sNRIZ5yOe Lo0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=brCSzH3Yj9YFk5AzY3Bq9IdGK1pVaTzuwUZ0Qo3mQ4o=; b=b9Errd9N9uBR/LGqesGbN6vfqVKdRDlgdlJYndeqpo5JvyTnfS+pbvc+WOXXBGWZSO bjYuqKA9T2I/hQpK6nxJjCy3MII18w0GMbOn0EnT8/Sxsh/Cuo/6uUiPM4U9vwFbzKt0 f26wjgOOws1Avkrz59OYkUcdZMPTGZVCYSsAtVy+J+WKUu4+7ZR/45kVAnu6HOvVBzzT tP8xb3rXdTUHFRxMTwYieNVAWTCqyOwB7AHIyXk4j42qUE7NnT0XVGoPpVqtNg7FN1uT 8ca1e472tkLiIpfIpmTtcUlB4ujWMCf6FGxgha+/N9IyyImQiCVjQGQuZ8ZSVoLuhJdC WnVQ== X-Gm-Message-State: AJcUukfRFzN3HNbhDLlHEnlIyN0bYQen6Ub8SuQTQ4sL5T55SUpwDPoY htGhsHKDxSkhDPehEUSWIbWknJCZa+I= X-Google-Smtp-Source: ALg8bN4oVC2T3BR20XpHxd6zeVa1J9ZUR+9iYnXq/JReFVwRjo4EbhJr3KOgiuVOjNltaJG6Hw80zw== X-Received: by 2002:a1c:d00d:: with SMTP id h13mr37967584wmg.13.1546551882347; Thu, 03 Jan 2019 13:44:42 -0800 (PST) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id k23sm32292751wmj.32.2019.01.03.13.44.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Jan 2019 13:44:41 -0800 (PST) In-Reply-To: <877efl8pgj.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 03 Jan 2019 22:38:36 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232150 Archived-At: Juri Linkov writes: >> 2. A diff is always a comparison of two revisions, right? For vc-dir, >> isn't a UI like query-replace's suitable here? You know, that thing >> where you type the pattern and the replacement interactively in the >> same minibuffer prompt, separated by the arrow. You can M-p, C-r, >> etc, flawlessly. I really like that UI, it's really intuitive (kudos >> to whoever participated, btw). >> >> So here, instead of pattern and replacement, two revisions. All one >> would need, apparently, is to turn the arrow into a ".." and make it >> toggleable to "..." with say, C-M-y. I think it would simplify the >> completion problem: on both sides of the ".." or "..." you just >> complete a revision using whatever system we presumably already have >> in place for that. > > Good idea. Cool. I'd say go for it! (unless someone seriously objects). For a first stab at this, most of the UI work would be in vc-diff-build-argument-list-internal which would, if passed an optional argument, say CHOOSE-REVISION-RELATIONSHIP, use the new UI and return an extra element at the end saying the merge-base should be used. It should be a question of grabbing this element in vc-version-diff and passing it this down to vc--diff. The Git backend would know how to handle it (as could presumably other backends). The value of CHOOSE-REVISION-RELATIONSHIP passed in vc-version-diff could be a backend-specific decision. > The only problem is that then we have to use different amount of dots > for vc-root-diff and vc-print-root-log because in git: =E2=80=98git diff > A...B=E2=80=99 corresponds to =E2=80=98git log A..B=E2=80=99 whereas =E2= =80=98git diff A..B=E2=80=99 > corresponds to =E2=80=98git log A...B=E2=80=99 Really? Ugh, that unfortunate. Well we could just live with it or use different symbols to abstract it away. Jo=C3=A3o