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.9 required=3.0 tests=AWL,BAYES_00, 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 394801F51C for ; Mon, 21 May 2018 20:24:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751019AbeEUUYR (ORCPT ); Mon, 21 May 2018 16:24:17 -0400 Received: from cloud.peff.net ([104.130.231.41]:48320 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750962AbeEUUYQ (ORCPT ); Mon, 21 May 2018 16:24:16 -0400 Received: (qmail 29602 invoked by uid 109); 21 May 2018 20:24:16 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Mon, 21 May 2018 20:24:16 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 31504 invoked by uid 111); 21 May 2018 20:24:24 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (ECDHE-RSA-AES256-GCM-SHA384 encrypted) SMTP; Mon, 21 May 2018 16:24:24 -0400 Authentication-Results: peff.net; auth=none Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Mon, 21 May 2018 16:24:14 -0400 Date: Mon, 21 May 2018 16:24:14 -0400 From: Jeff King To: Stefan Beller Cc: Johannes Schindelin , Igor Djordjevic , Eric Sunshine , Junio C Hamano , Git List , Thomas Rast , Thomas Gummerer , =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Ramsay Jones , Jacob Keller Subject: Re: [PATCH v2 02/18] Add a new builtin: branch-diff Message-ID: <20180521202414.GA14250@sigill.intra.peff.net> References: <20180505182631.GC17700@sigill.intra.peff.net> <20180507074843.GC31170@sigill.intra.peff.net> <3cefc6b3-3dbd-9cb1-20d0-193116191726@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, May 21, 2018 at 10:56:47AM -0700, Stefan Beller wrote: > > It is very much about > > comparing two *ranges of* revisions, and not just any ranges, no. Those > > ranges need to be so related as to contain mostly identical changes. > > range-diff, eh? > > > Most fellow German software engineers (who seem to have a knack for > > idiotically long variable/function names) would now probably suggest: > > > > git compare-patch-series-with-revised-patch-series > > or short: > > revision-compare > compare-revs > com-revs > > revised-diff > revise-diff > revised-compare > > diff-revise I still like "range diff", but I think something around "revise" is a good line of thought, too. Because it implies that we expect the two ranges to be composed of almost-the-same commits. That leads to another use case where I think focusing on topic branches (or even branches at all) would be a misnomer. Imagine I cherry-pick a bunch of commits with: git cherry-pick -10 $old_commit I might then want to see how the result differs with something like: git range-diff $old_commit~10..$old_commit HEAD~10..HEAD I wouldn't think of this as a topic-branch operation, but just as comparing two sequences of commits. I guess "revise" isn't strictly accurate here either, as I'm not revising. But I do assume the two ranges share some kind of mapping of patches. -Peff PS I wish there were a nicer syntax to do that. Perhaps "git range-diff -10 $old_commit HEAD" could work, though occasionally the two ranges are not the same length (e.g., if you ended up skipping one of the cherry-picked commits). Anyway, those kind of niceties can easily come later on top. :)