From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id B903F200B9 for ; Mon, 7 May 2018 02:04:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbeEGCEv (ORCPT ); Sun, 6 May 2018 22:04:51 -0400 Received: from mout.gmx.net ([212.227.15.18]:52771 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751781AbeEGCEu (ORCPT ); Sun, 6 May 2018 22:04:50 -0400 Received: from [10.40.94.26] ([209.226.201.248]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MHoC5-1fBwDO09nB-003d64; Mon, 07 May 2018 04:04:35 +0200 Date: Sun, 6 May 2018 22:04:31 -0400 (DST) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: Eric Sunshine cc: Junio C Hamano , Jeff King , Git List , Thomas Rast , Thomas Gummerer , =?UTF-8?Q?=C3=86var_Arnfj=C3=B6r=C3=B0_Bjarmason?= , Ramsay Jones , Stefan Beller , Jacob Keller Subject: Re: [PATCH v2 02/18] Add a new builtin: branch-diff In-Reply-To: Message-ID: References: <20180505182631.GC17700@sigill.intra.peff.net> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K1:j0nS1UN15yZISvDH7pNLLFf8zHt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PpAl Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Eric, On Sun, 6 May 2018, Eric Sunshine wrote: > On Sun, May 6, 2018 at 8:21 AM, Johannes Schindelin > wrote: > > On Sun, 6 May 2018, Junio C Hamano wrote: > >> Johannes Schindelin writes: > >> > On Sat, 5 May 2018, Jeff King wrote: > >> >> One minor point about the name: will it become annoying as a tab > >> >> completion conflict with git-branch? > >> > >> If tbdiff were "Thomas's branch diff", I would call this jbdiff ;-) > >> but I think the 't' in there stands for "topic", not "Thomas's". > >> How about "git topic-diff"? > > > > Or `git topic-branch-diff`? > > > > But then, we do not really use the term `topic branch` a lot in Git, *and* > > the operation in question is not really about showing differences between > > topic branches, but between revisions of topic branches. > > > > So far, the solution I like best is to use `git branch --diff <...>`, > > which also neatly side-steps the problem of cluttering the top-level > > command list (because tab completion). > > Let's, please, not fall into the trap of polluting git-branch with > utterly unrelated functionality, as has happened a few times with > other Git commands. Let's especially not do so merely for the sake of > tab-completion. git-branch is for branch management; it's not for > diff'ing. I totally disagree. `git branch` is *the* command to work with branches. Yes, you can manage branches. But you can also list them. And now you can also compare them. > Of the suggestions thus far, Junio's git-topic-diff seems the least > worse, and doesn't suffer from tab-completion problems. Except that this is too limited a view. Have you seen one of the more important tidbits in the cover letter, the one about Git for Windows' *branch thicket*? In this case, it is not *one* topic branch that we are talking about. And even worse: what this patch series introduces is not at all a feature to compare topic branches! Instead, it is a way to compare iterations of patch series, versions of topic branches, changes introduced into a topic branch by rebasing it, etc. And `git topic-diff` simply does not say this. It says something different, something that my patches cannot fulfill. > Building on Duy's suggestion: git-interdiff could be a superset of the > current git-branch-diff: > > # standard interdiff > git interdiff womp-v1 womp-v2 > # 'tbdiff'-like output > git interdiff --topic womp-v1 womp-v2 No, no, and no. An interdiff is an interdiff is an interdiff. See e.g. https://www.tutorialspoint.com/unix_commands/interdiff.htm for details. The operation introduced by this patch series, or for that matter tbdiff, *never ever* produced an interdiff. Get this "interdiff" label out of your mind immediately when you think about this here operation. One of my commit messages even talks about this, and says *why* we do not generate interdiffs: they are in general not even well-defined. Take my --rebase-merges patch series, for example. It is so long-running that at some stages, all I did was to resolve merge conflicts incurred from rebasing to `master`. That was literally all. Now, if you tried to produce an interdiff, you would *already fail in the first step*, as the previous overall diff does not apply in reverse on current `master`. Out of all the options so far, the one that I liked was `git branch --diff`. Seriously. I do not understand why you think that this is abusing the `git branch` command. It is no less abusing it than `git branch --edit-description`! And that is a *very good* command, and it is *very good* that it is an option to `git branch`. It makes a total lot of sense, I have never had to think "wait, in which Git command is this implemented already?" And I would expect the exact same thing to happen with `git branch --diff`. Ciao, Johannes