From patchwork Thu Feb 4 09:31:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin X-Patchwork-Id: 12066657 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FD95C433E0 for ; Thu, 4 Feb 2021 09:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FBC464F58 for ; Thu, 4 Feb 2021 09:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235220AbhBDJcW (ORCPT ); Thu, 4 Feb 2021 04:32:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234765AbhBDJcS (ORCPT ); Thu, 4 Feb 2021 04:32:18 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDCBAC0613D6 for ; Thu, 4 Feb 2021 01:31:37 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id u14so2673204wri.3 for ; Thu, 04 Feb 2021 01:31:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=lWl5oMZywpdSWlIVHWwdXwp1SyJVtsfWXZNH7AT7K4Y=; b=TYbCT7+mA5Kj7QL4W/bqXrWmgVVaMo4BP4rE1JnMwkt4/XRzZUW/L+vxA5myhZEB+s k+6/EU6a9Kclfv6xr51iBIrAe3MGSW5ndfqUCjWcPOPVlD7AkuY1b8aI6Ekv8k5wb93d ce7WB98hWgZ2uNejHhWLDk+l3nFOMJxNqNj6lavki7e1QMZwfIfQrqQIKZVAH+5y+r80 bohQcMwNBsCVstjtYw3zYdnWdFNG1U+2pafSTY8a9twCv4W4Tip0QEYBp5evmfcI6Z5M TIa33w+enTmKlhQvxXnQ4QJiOFQ7ImWAQH7q7SBa/VAqVudUU1ph0/1eE8w1GKfYr8hh +MuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=lWl5oMZywpdSWlIVHWwdXwp1SyJVtsfWXZNH7AT7K4Y=; b=FN0Gap0bQ54VRRxR4X8Vy2gqPlnIMBEbJXM/ZfcEC0A2nFfFOtW4zxFa60TT9S+iRX BgbAtMXuJTMHdyUZ3H5wveCSiwn26SG1ieJDI2oQTYxbI2mlkZVc+H0odE2o40BRlIs+ eaz+HEz/PVgyZGTKpSVSHPlNF/l1xmsKq1abYlARlv352CAVMCXuQnBDdruDFNPtOC0n JAdeWKSQnIGqu6rpTOSdOMpYAN14x8jwBLlLqPpEpjma3+KHl8gQ0BNSowm7ytVrWa68 yPjxYC+FcvmMXdR6kA3BWvg2pB0yBXwZLNjElW+78XHx7GGqBVn98D2ML1vOgfr/aowB 13Yg== X-Gm-Message-State: AOAM5303bw9dkaGzZJOQAn7x5f460XzAuRTQpGwg0EX5TVLd/zlLI4Uf RDyhbBMyAmdRqTUtUxi7g7z75Vd2kpc= X-Google-Smtp-Source: ABdhPJzgXOvPs/To0eqFhiDcgiTXgtw/frqm7uT9XHBL55iRkgr+2KqaRVgcMklvwqT9vLgA+LB6Gw== X-Received: by 2002:a05:6000:1364:: with SMTP id q4mr7955363wrz.335.1612431096412; Thu, 04 Feb 2021 01:31:36 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id c3sm1872900wrr.6.2021.02.04.01.31.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 01:31:35 -0800 (PST) Message-Id: In-Reply-To: References: Date: Thu, 04 Feb 2021 09:31:30 +0000 Subject: [PATCH v4 1/3] range-diff/format-patch: refactor check for commit range Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Uwe =?utf-8?q?Kleine-K=C3=B6nig?= , Eric Sunshine , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin From: Johannes Schindelin Currently, when called with exactly two arguments, `git range-diff` tests for a literal `..` in each of the two. Likewise, the argument provided via `--range-diff` to `git format-patch` is checked in the same manner. However, `^!` is a perfectly valid commit range, equivalent to `^..` according to the `SPECIFYING RANGES` section of gitrevisions[7]. In preparation for allowing more sophisticated ways to specify commit ranges, let's refactor the check into its own function. Signed-off-by: Johannes Schindelin --- builtin/log.c | 2 +- builtin/range-diff.c | 9 +++++---- range-diff.c | 5 +++++ range-diff.h | 8 ++++++++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index bd6ff4f9f956..aeece57e86a2 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1680,7 +1680,7 @@ static void infer_range_diff_ranges(struct strbuf *r1, struct commit *head) { const char *head_oid = oid_to_hex(&head->object.oid); - int prev_is_range = !!strstr(prev, ".."); + int prev_is_range = is_range_diff_range(prev); if (prev_is_range) strbuf_addstr(r1, prev); diff --git a/builtin/range-diff.c b/builtin/range-diff.c index 24c4162f7446..5b1f6326322f 100644 --- a/builtin/range-diff.c +++ b/builtin/range-diff.c @@ -3,6 +3,7 @@ #include "parse-options.h" #include "range-diff.h" #include "config.h" +#include "revision.h" static const char * const builtin_range_diff_usage[] = { N_("git range-diff [] .. .."), @@ -46,12 +47,12 @@ int cmd_range_diff(int argc, const char **argv, const char *prefix) diffopt.use_color = 1; if (argc == 2) { - if (!strstr(argv[0], "..")) - die(_("no .. in range: '%s'"), argv[0]); + if (!is_range_diff_range(argv[0])) + die(_("not a commit range: '%s'"), argv[0]); strbuf_addstr(&range1, argv[0]); - if (!strstr(argv[1], "..")) - die(_("no .. in range: '%s'"), argv[1]); + if (!is_range_diff_range(argv[1])) + die(_("not a commit range: '%s'"), argv[1]); strbuf_addstr(&range2, argv[1]); } else if (argc == 3) { strbuf_addf(&range1, "%s..%s", argv[0], argv[1]); diff --git a/range-diff.c b/range-diff.c index b9950f10c8c4..9b93e08e8407 100644 --- a/range-diff.c +++ b/range-diff.c @@ -564,3 +564,8 @@ int show_range_diff(const char *range1, const char *range2, return res; } + +int is_range_diff_range(const char *arg) +{ + return !!strstr(arg, ".."); +} diff --git a/range-diff.h b/range-diff.h index 583ced2e8e74..c17dbc2e75a8 100644 --- a/range-diff.h +++ b/range-diff.h @@ -16,4 +16,12 @@ int show_range_diff(const char *range1, const char *range2, const struct diff_options *diffopt, const struct strvec *other_arg); +/* + * Determine whether the given argument is usable as a range argument of `git + * range-diff`, e.g. A..B. Note that this only validates the format but does + * _not_ parse it, i.e. it does _not_ look up the specified commits in the + * local repository. + */ +int is_range_diff_range(const char *arg); + #endif From patchwork Thu Feb 4 09:31:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin X-Patchwork-Id: 12066659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8C71C433E6 for ; Thu, 4 Feb 2021 09:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 527FC64F5E for ; Thu, 4 Feb 2021 09:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235222AbhBDJcY (ORCPT ); Thu, 4 Feb 2021 04:32:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235186AbhBDJcT (ORCPT ); Thu, 4 Feb 2021 04:32:19 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFB44C0613ED for ; Thu, 4 Feb 2021 01:31:38 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id l12so2688304wry.2 for ; Thu, 04 Feb 2021 01:31:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=pbx2zX9Lb4qAnDAabqsCU5n0npMAGZopg3hc8MCT9mM=; b=agUdMfAXYvQaBWrmWAtdgfFrHIOGYK52eRvvEn/kAxPOyCIveyE+G4aizaoiRdKhl7 Gfu+Fe/coE1xJVjIZXK3vxX8DlR6jYdLLBp21HzO6C7kBYg8UhTRABiaoSOf+CB0IsLA OdDGIm0HTIF6SQZYeenju5QEeSp3CR6XIZKiQQJffr70rr4/UaKpRSJVpifSq7ogqli+ XPJ51PDkB0iV9MhYHbFhcPdcVx4Zs2ncsNHNH9DHzxZPsBdM1LK1TxT2dhyj7pEeI7W6 zjX9kMdT4wb2MNGuboIGjQbVb+mKt2KCQjspPIdf8PCHenscHArT3u7eriL7FHCmra7T dQLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=pbx2zX9Lb4qAnDAabqsCU5n0npMAGZopg3hc8MCT9mM=; b=p/BwP/X1IW8Gfv9QpeBAJsnPyfIuMER8AjXi8aH2z6hUVJEcUbK81/xI2ZaV0ScOZr AJ+Y3wPpBWZpfJnzx4/5ShJpAbtShfdfmNY5fiqbEeQ8s1nCnerbJXMk0Cj6tfTHeZ5P bAZAu9cFElfMY2jDgEHMtwhFLYbFQQLEGe+vDys3tay1yX/BjRa9P32JCF2KCZOLgKan u78MExGvVYkNNykmsFMstI7QtZfZuyOy8R9xwvL+fAzKDDMwqkK3uvm90o/gn90EORwA SLW2PJYVuafRUHJde6+009xNENXCgCIcy3U/4BJA7y3h8AswLNJmDHWFoNjjfrzVcgSo ZPmQ== X-Gm-Message-State: AOAM533aoVdqzjszvTGPJzxCYedJxJUJhr1PeUT6xaGmfexUs0VPu9sY 7S74Qp6Jme6e2JXKiCDw1btrpQC/T1U= X-Google-Smtp-Source: ABdhPJw8K6V+KdBQVC2FyZAHqM9CcWIJCXpiWwSQqlXCPb83fScUC2lcvt37+2ztpa9a0xUeiUcLiw== X-Received: by 2002:adf:eacc:: with SMTP id o12mr8142593wrn.202.1612431097563; Thu, 04 Feb 2021 01:31:37 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o17sm7271698wrm.52.2021.02.04.01.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 01:31:36 -0800 (PST) Message-Id: <448e6a64fa157990fcc973ce2fe4a9fc2ba1ab32.1612431093.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Thu, 04 Feb 2021 09:31:31 +0000 Subject: [PATCH v4 2/3] range-diff/format-patch: handle commit ranges other than A..B Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Uwe =?utf-8?q?Kleine-K=C3=B6nig?= , Eric Sunshine , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin From: Johannes Schindelin In the `SPECIFYING RANGES` section of gitrevisions[7], two ways are described to specify commit ranges that `range-diff` does not yet accept: "^!" and "^-". Let's accept them, by parsing them via the revision machinery and looking for at least one interesting and one uninteresting revision in the resulting `pending` array. Signed-off-by: Johannes Schindelin --- range-diff.c | 19 ++++++++++++++++++- t/t3206-range-diff.sh | 8 ++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/range-diff.c b/range-diff.c index 9b93e08e8407..07e212d5bb8c 100644 --- a/range-diff.c +++ b/range-diff.c @@ -11,6 +11,7 @@ #include "pretty.h" #include "userdiff.h" #include "apply.h" +#include "revision.h" struct patch_util { /* For the search for an exact match */ @@ -567,5 +568,21 @@ int show_range_diff(const char *range1, const char *range2, int is_range_diff_range(const char *arg) { - return !!strstr(arg, ".."); + char *copy = xstrdup(arg); /* setup_revisions() modifies it */ + const char *argv[] = { "", copy, "--", NULL }; + int i, positive = 0, negative = 0; + struct rev_info revs; + + init_revisions(&revs, NULL); + if (setup_revisions(3, argv, &revs, 0) == 1) { + for (i = 0; i < revs.pending.nr; i++) + if (revs.pending.objects[i].item->flags & UNINTERESTING) + negative++; + else + positive++; + } + + free(copy); + object_array_clear(&revs.pending); + return negative > 0 && positive > 0; } diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh index 6eb344be0312..e217cecac9ed 100755 --- a/t/t3206-range-diff.sh +++ b/t/t3206-range-diff.sh @@ -150,6 +150,14 @@ test_expect_success 'simple A B C (unmodified)' ' test_cmp expect actual ' +test_expect_success 'A^! and A^- (unmodified)' ' + git range-diff --no-color topic^! unmodified^-1 >actual && + cat >expect <<-EOF && + 1: $(test_oid t4) = 1: $(test_oid u4) s/12/B/ + EOF + test_cmp expect actual +' + test_expect_success 'trivial reordering' ' git range-diff --no-color master topic reordered >actual && cat >expect <<-EOF && From patchwork Thu Feb 4 09:31:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Schindelin X-Patchwork-Id: 12066661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEE40C43381 for ; Thu, 4 Feb 2021 09:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81DE764F51 for ; Thu, 4 Feb 2021 09:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235224AbhBDJcZ (ORCPT ); Thu, 4 Feb 2021 04:32:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235205AbhBDJcU (ORCPT ); Thu, 4 Feb 2021 04:32:20 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C66DC061786 for ; Thu, 4 Feb 2021 01:31:40 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id w4so2476433wmi.4 for ; Thu, 04 Feb 2021 01:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=t01brVa3DPyyG5QvvLYXIclMlNeWgdfEbDYtwwEZ5z4=; b=q0wPmdY4RsyVHMroL/4kMMX0E3cTD/OFLkTYZvqPs+FDMkK1Swyv6MZgl8JfCW/RgP TchuntHZ2b9BkZy0P0Nr2ADcDtfOI4UycHeF70XhTqV2eRov0TEZ3xb+N2y4OpycXvfM mtdKG5r+gmPRTXiMXHS1sJDg6aw9bZGkSPifx0mqYZzZRSthcf3zx+3GksNl1oTKg4kZ fjyJQTH7xJ1Mz6aC/FevS01ir43A4cB8KDfuVZ4D4Siw1AACM+HeeeV9TBJPSlcEwBCg 5rwVS6zGtQzPQZkTa9Hc+vG3+lUJDxf5f9deLcQYv1HChWJc2gWdEiYh47Rnz3vVIZcy rDWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=t01brVa3DPyyG5QvvLYXIclMlNeWgdfEbDYtwwEZ5z4=; b=r70C27/jfHEFPdayYwhiMNuaw8DjX69JLWx8VDgXi8ZCWGx6TnQHU+mPmD5leUe522 jUMBDXHK1jEOui0WR1+5wyhksRzWw52eQURtcV5n6z0ckST69picmk4Z6F/9W2XGma3b O7le4R+U205LNqUewqSqcUmypTSJ/pwnTzIaVNDw3KmtK7tQLeo2Ach/fvBCwtMGKoyW HyWh9Y87F04vDvgTyjgNePcPhQqZcueOEQFO1TjkLWuADZsl1V0bHA126ycaUcFyKiSl wgKG1UR9uTLuKOZKOlDNcgmOqUEJw/LkQKG5+/QVEUIkUFzzbwG0KVkp/5xRgSKVj7F6 xxeg== X-Gm-Message-State: AOAM531aCWKIm8nGBiQqof+DHD/ULAMtljTgA8oQNh2PiP3CoOoHv2eA oHXawyYsI5tjCuEo+s/uNe8u/ng32EU= X-Google-Smtp-Source: ABdhPJz7jsdJWatCTkgloaqiDN5HFfnAmprUAxGwYE48io5i4wA4qPDCENYTW6+qFzBJldy3mzUtmw== X-Received: by 2002:a1c:1f4d:: with SMTP id f74mr6828606wmf.12.1612431098693; Thu, 04 Feb 2021 01:31:38 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id r17sm7321069wro.46.2021.02.04.01.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 01:31:38 -0800 (PST) Message-Id: <295fdc1cd32cffcef145d9dd0ac76d29580fa6de.1612431093.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Thu, 04 Feb 2021 09:31:32 +0000 Subject: [PATCH v4 3/3] range-diff(docs): explain how to specify commit ranges Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Uwe =?utf-8?q?Kleine-K=C3=B6nig?= , Eric Sunshine , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin From: Johannes Schindelin There are three forms, depending whether the user specifies one, two or three non-option arguments. We've never actually explained how this works in the manual, so let's explain it. Signed-off-by: Johannes Schindelin --- Documentation/git-range-diff.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/git-range-diff.txt b/Documentation/git-range-diff.txt index 9701c1e5fdd5..14bffb272a06 100644 --- a/Documentation/git-range-diff.txt +++ b/Documentation/git-range-diff.txt @@ -28,6 +28,18 @@ Finally, the list of matching commits is shown in the order of the second commit range, with unmatched commits being inserted just after all of their ancestors have been shown. +There are three ways to specify the commit ranges: + +- ` `: Either commit range can be of the form + `..`, `^!` or `^-`. See `SPECIFYING RANGES` + in linkgit:gitrevisions[7] for more details. + +- `...`. This resembles the symmetric ranges mentioned in + the `SPECIFYING RANGES` section of linkgit:gitrevisions[7], and is + equivalent to `.. ..`. + +- ` `: This is equivalent to `.. + ..`. OPTIONS -------