From patchwork Mon Oct 9 16:05:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13413988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 395B3C2BA1B for ; Mon, 9 Oct 2023 16:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377135AbjJIQGx (ORCPT ); Mon, 9 Oct 2023 12:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377121AbjJIQGt (ORCPT ); Mon, 9 Oct 2023 12:06:49 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C5FA9C for ; Mon, 9 Oct 2023 09:06:47 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2c131ddfeb8so53272281fa.3 for ; Mon, 09 Oct 2023 09:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696867605; x=1697472405; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3jBqmNGoHlVjhrcYkCvjjdl/nEY99/zHYoS/dj2G1pg=; b=kRcgo7Rbun3RGTnIjcmSEVBWNJYWQPNgqdu7c9y8yROt8WocSfAnLZ2rTTaNcr8Rzu tfKK2LcaMAGDg6zEwj25YLVZS/m/4Ad/FKImFnYdXsUuNtQ8CcbhTCeBHFF6H9HgPyVn PmnmA/cGwfxdlsC2So3dgZSrZ3EmM/fylfju9hBOW2xbNTgNuD6+VKyVFWmf3M1YJ+MI 8Wouid8ukwQDp+Rk8adLaQTiDjk3nKG9NZeQ8BBZnHJZJh32eXsl+pDGhZhHRTV+YOUl 4CHTfJvOROD14/4+uzPTMUBiHJ8kFeZ9LxAdh5yS3UXAWivFwdcHlqT473B3BNhipYKr lNNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696867605; x=1697472405; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3jBqmNGoHlVjhrcYkCvjjdl/nEY99/zHYoS/dj2G1pg=; b=f+YTyGvC6qu0C9O80xYEwVYYrtnAzEIljl2Oprd3PVK/cfrJrIw2F8nrV8rs0uIHUK jnCu4vNRn3TczV9QjNsfuZ6DoIVLmofKkoF3NZSbaiLHbE0Vxq8T8HLYlHnW+WTLHZpC 4sTHJEe3HSHck3TClIFEXp9tFZpcMM2vtKZrXkbRvtaiTmY+hXCII9xT34wdLudE8m2M 908+2uODKzSDofvlfwvXUgLFthSkQ9mlq+lu1JbBDUi3cui53PhQ2udzZXodMcdy8bhv 0P65L65X/8Zvqvob2xn5DseEBdfv0MC8s5qdvhAHCi7Uu8H8C6dRpk8SiS5jQ/SPeaeN wfRQ== X-Gm-Message-State: AOJu0Yy5hMP5sXIY/qP45BiWANk+2hlFRvtEbpK+s5mV+5cZzIqDQOq/ LtyOTbShFBRnxgwQRgEt3796Pydp2S8= X-Google-Smtp-Source: AGHT+IHmhE9o7fEBxcwC5aLjCJGjszBwus3Bd+jO7iLaJyvLuTqOl4+4DQVtrvpb16xEtk9d8SRazA== X-Received: by 2002:a2e:a281:0:b0:2bc:c771:5498 with SMTP id k1-20020a2ea281000000b002bcc7715498mr13081716lja.18.1696867605146; Mon, 09 Oct 2023 09:06:45 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id j22-20020a2e8256000000b002b6daa3fa2csm2019715ljh.69.2023.10.09.09.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:06:44 -0700 (PDT) From: Sergey Organov To: Junio C Hamano Cc: git@vger.kernel.org, Elijah Newren , Sergey Organov Subject: [PATCH v4 1/3] diff-merges: improve --diff-merges documentation Date: Mon, 9 Oct 2023 19:05:33 +0300 Message-Id: <20231009160535.236523-2-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231009160535.236523-1-sorganov@gmail.com> References: <20230909125446.142715-1-sorganov@gmail.com> <20231009160535.236523-1-sorganov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org * Put descriptions of convenience shortcuts first, so they are the first things reader observes rather than lengthy detailed stuff. * Get rid of very long line containing all the --diff-merges formats by replacing them with , and putting each supported format on its own line. Signed-off-by: Sergey Organov --- Documentation/diff-options.txt | 100 ++++++++++++++++++--------------- Documentation/git-log.txt | 2 +- 2 files changed, 55 insertions(+), 47 deletions(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 9f33f887711d..69065c0e90a8 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -43,66 +43,74 @@ endif::git-diff[] endif::git-format-patch[] ifdef::git-log[] ---diff-merges=(off|none|on|first-parent|1|separate|m|combined|c|dense-combined|cc|remerge|r):: +-m:: + Show diffs for merge commits in the default format. This is + similar to '--diff-merges=on', except `-m` will + produce no output unless `-p` is given as well. + +-c:: + Produce combined diff output for merge commits. + Shortcut for '--diff-merges=combined -p'. + +--cc:: + Produce dense combined diff output for merge commits. + Shortcut for '--diff-merges=dense-combined -p'. + +--remerge-diff:: + Produce remerge-diff output for merge commits. + Shortcut for '--diff-merges=remerge -p'. + --no-diff-merges:: + Synonym for '--diff-merges=off'. + +--diff-merges=:: Specify diff format to be used for merge commits. Default is - {diff-merges-default} unless `--first-parent` is in use, in which case - `first-parent` is the default. + {diff-merges-default} unless `--first-parent` is in use, in + which case `first-parent` is the default. + ---diff-merges=(off|none)::: ---no-diff-merges::: +The following formats are supported: ++ +-- +off, none:: Disable output of diffs for merge commits. Useful to override implied value. + ---diff-merges=on::: ---diff-merges=m::: --m::: - This option makes diff output for merge commits to be shown in - the default format. `-m` will produce the output only if `-p` - is given as well. The default format could be changed using - `log.diffMerges` configuration parameter, which default value +on, m:: + Make diff output for merge commits to be shown in the default + format. The default format could be changed using + `log.diffMerges` configuration variable, whose default value is `separate`. + ---diff-merges=first-parent::: ---diff-merges=1::: - This option makes merge commits show the full diff with - respect to the first parent only. +first-parent, 1:: + Show full diff with respect to first parent. This is the same + format as `--patch` produces for non-merge commits. + ---diff-merges=separate::: - This makes merge commits show the full diff with respect to - each of the parents. Separate log entry and diff is generated - for each parent. +separate:: + Show full diff with respect to each of parents. + Separate log entry and diff is generated for each parent. + ---diff-merges=remerge::: ---diff-merges=r::: ---remerge-diff::: - With this option, two-parent merge commits are remerged to - create a temporary tree object -- potentially containing files - with conflict markers and such. A diff is then shown between - that temporary tree and the actual merge commit. +combined, c:: + Show differences from each of the parents to the merge + result simultaneously instead of showing pairwise diff between + a parent and the result one at a time. Furthermore, it lists + only files which were modified from all parents. ++ +dense-combined, cc:: + Further compress output produced by `--diff-merges=combined` + by omitting uninteresting hunks whose contents in the parents + have only two variants and the merge result picks one of them + without modification. ++ +remerge, r:: + Remerge two-parent merge commits to create a temporary tree + object--potentially containing files with conflict markers + and such. A diff is then shown between that temporary tree + and the actual merge commit. + The output emitted when this option is used is subject to change, and so is its interaction with other options (unless explicitly documented). -+ ---diff-merges=combined::: ---diff-merges=c::: --c::: - With this option, diff output for a merge commit shows the - differences from each of the parents to the merge result - simultaneously instead of showing pairwise diff between a - parent and the result one at a time. Furthermore, it lists - only files which were modified from all parents. `-c` implies - `-p`. -+ ---diff-merges=dense-combined::: ---diff-merges=cc::: ---cc::: - With this option the output produced by - `--diff-merges=combined` is further compressed by omitting - uninteresting hunks whose contents in the parents have only - two variants and the merge result picks one of them without - modification. `--cc` implies `-p`. +-- --combined-all-paths:: This flag causes combined diffs (used for merge commits) to diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 2a66cf888074..9b7ec96e767a 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -124,7 +124,7 @@ Note that unless one of `--diff-merges` variants (including short will not show a diff, even if a diff format like `--patch` is selected, nor will they match search options like `-S`. The exception is when `--first-parent` is in use, in which case `first-parent` is -the default format. +the default format for merge commits. :git-log: 1 :diff-merges-default: `off` From patchwork Mon Oct 9 16:05:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13413987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4AF6E95A9F for ; Mon, 9 Oct 2023 16:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377134AbjJIQGw (ORCPT ); Mon, 9 Oct 2023 12:06:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377122AbjJIQGt (ORCPT ); Mon, 9 Oct 2023 12:06:49 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C753692 for ; Mon, 9 Oct 2023 09:06:47 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c131ddfeb8so53272341fa.3 for ; Mon, 09 Oct 2023 09:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696867606; x=1697472406; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cyGYLuFukAPzdIjZveYEYl1mbX1qRmowPHlC5+v4IaM=; b=SduLe18SvDayE0wQoZI+kSyNVC/Mpf+Jp4MTk4cumgXKLmRdR2HecFZm29HhhTQMe0 y5H5AHGQiVmZtw+ZNCESaYHQguIbPr+tbH3MrFv8ml/jRWTnkgo7ycSMhtUOXHP38+fo 3XOSfBsStoJcNtCwGa9NpxNoPJs/AwwDXAKz88QYfLslR+EswDqYh9qQhlwdOa+ICY7Q Do3sM3w7EguebDhXq0l9+JRIwqnp3PCtqvcAEjvurvuXAXzyQvATv/IKvPSTJiDmKCyT fByfJlNVTxwFeN8g2nJ1HMmTxKPZ7EE/yeeGPWkxHKYEoqT0HGu4HgoPyVnZBUnhMdNG AxeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696867606; x=1697472406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cyGYLuFukAPzdIjZveYEYl1mbX1qRmowPHlC5+v4IaM=; b=LvdGSwSxDNRnxO3fAjj+Wr0c2oFxZS85JbYaGuvLTZjbGyn+EZTEZFwHl9LygrRW8W rQ+QAwVrJC+OjU4QLdPMEwFxB9d9O9FGtX6FUhwG+fLOkqpIX1mtjXppnUndtdP8Uws+ fIXpGBJerk8CywSV2o3xPiix9soCdAFOgtrxyXW1GE6H8cLSNRHIVP6YvsbAj+G1ZTAx OaXFEcc28eBFou2eGeWfsq6vGQHJygIc0t7xkhdjvmNprbEETelsQW/IV7GX/+blTyZX ov/1f6a/LvOo+FxZRunZjeaTb6YdiRhdCma3Y7icA7RCKhhWL0Q0q3L3rOiK2rVkYLqq kQcA== X-Gm-Message-State: AOJu0YzisFLRmWyT3Xi+rAYOcCTn6el7DMb7jyKI3UGYbz8t7khfyE8l H1kxyQ/7Si9xEVTBFccSd23h2tpYTp4= X-Google-Smtp-Source: AGHT+IFv/vUBMCgOmjpn9+r+FrbtLDk+7V3Cz9Kap55Gxe0SgeXW0kz80Vf2XkiTaJz5+8M+aT6A+w== X-Received: by 2002:a2e:95d0:0:b0:2bf:7dac:a51 with SMTP id y16-20020a2e95d0000000b002bf7dac0a51mr13775962ljh.51.1696867605836; Mon, 09 Oct 2023 09:06:45 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id j22-20020a2e8256000000b002b6daa3fa2csm2019715ljh.69.2023.10.09.09.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:06:45 -0700 (PDT) From: Sergey Organov To: Junio C Hamano Cc: git@vger.kernel.org, Elijah Newren , Sergey Organov Subject: [PATCH v4 2/3] diff-merges: introduce '--dd' option Date: Mon, 9 Oct 2023 19:05:34 +0300 Message-Id: <20231009160535.236523-3-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231009160535.236523-1-sorganov@gmail.com> References: <20230909125446.142715-1-sorganov@gmail.com> <20231009160535.236523-1-sorganov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This option provides a shortcut to request diff with respect to first parent for any kind of commit, universally. It's implemented as pure synonym for "--diff-merges=first-parent --patch". Gives user quick and universal way to see what changes, exactly, were brought to a branch by merges as well as by regular commits. Signed-off-by: Sergey Organov --- Documentation/diff-options.txt | 5 +++++ Documentation/git-log.txt | 2 +- diff-merges.c | 3 +++ t/t4013-diff-various.sh | 8 ++++++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 69065c0e90a8..23f95e6172b9 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -56,6 +56,11 @@ ifdef::git-log[] Produce dense combined diff output for merge commits. Shortcut for '--diff-merges=dense-combined -p'. +--dd:: + Produce diff with respect to first parent for both merge and + regular commits. + Shortcut for '--diff-merges=first-parent -p'. + --remerge-diff:: Produce remerge-diff output for merge commits. Shortcut for '--diff-merges=remerge -p'. diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt index 9b7ec96e767a..579682172fe4 100644 --- a/Documentation/git-log.txt +++ b/Documentation/git-log.txt @@ -120,7 +120,7 @@ By default, `git log` does not generate any diff output. The options below can be used to show the changes made by each commit. Note that unless one of `--diff-merges` variants (including short -`-m`, `-c`, and `--cc` options) is explicitly given, merge commits +`-m`, `-c`, `--cc`, and `--dd` options) is explicitly given, merge commits will not show a diff, even if a diff format like `--patch` is selected, nor will they match search options like `-S`. The exception is when `--first-parent` is in use, in which case `first-parent` is diff --git a/diff-merges.c b/diff-merges.c index ec97616db1df..45507588a279 100644 --- a/diff-merges.c +++ b/diff-merges.c @@ -131,6 +131,9 @@ int diff_merges_parse_opts(struct rev_info *revs, const char **argv) } else if (!strcmp(arg, "--cc")) { set_dense_combined(revs); revs->merges_imply_patch = 1; + } else if (!strcmp(arg, "--dd")) { + set_first_parent(revs); + revs->merges_imply_patch = 1; } else if (!strcmp(arg, "--remerge-diff")) { set_remerge_diff(revs); revs->merges_imply_patch = 1; diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 5de1d190759f..4b474808311e 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -473,6 +473,14 @@ test_expect_success 'log --diff-merges=on matches --diff-merges=separate' ' test_cmp expected actual ' +test_expect_success 'log --dd matches --diff-merges=1 -p' ' + git log --diff-merges=1 -p master >result && + process_diffs result >expected && + git log --dd master >result && + process_diffs result >actual && + test_cmp expected actual +' + test_expect_success 'deny wrong log.diffMerges config' ' test_config log.diffMerges wrong-value && test_expect_code 128 git log From patchwork Mon Oct 9 16:05:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13413989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5387EE95A9E for ; Mon, 9 Oct 2023 16:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377144AbjJIQGz (ORCPT ); Mon, 9 Oct 2023 12:06:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377102AbjJIQGu (ORCPT ); Mon, 9 Oct 2023 12:06:50 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8489291 for ; Mon, 9 Oct 2023 09:06:48 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c1886777d9so55896181fa.0 for ; Mon, 09 Oct 2023 09:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696867607; x=1697472407; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YaoLmD52Y+EL+MseUZEJT5nWlN61NOhtDRWfe/woSqc=; b=GDrRaByLgYD+tSnQGwkNrF/hKDa1Yj/Z3wIHR6O2+TPGxuB0sk47et5kbjp+H7mV3V OIig6zKoHHYq32HRtr0Umm8ip+d4fu9cpNbaSq3TjMC57C46N/59BNZ4bvq0AovKxZc1 hpiwMATSd79tpP0ocGSKT3myCg513rU9DPcTx+RQW19gHMJNlTHo7YFWyHigSpOZgv+s VozWU4yCi/3Qc9OHJXOndbjX+wPfFZwGQoNQhcWSgzFrR4cpbsKtfgdYKB+bcB3y3Dlf 8tSWLe769mdPQjj8mnNPD8lhaSgHBn/a+bkzZ15tQf5dqKyKPQmZaznXrYGHZoOVnbcc JuXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696867607; x=1697472407; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YaoLmD52Y+EL+MseUZEJT5nWlN61NOhtDRWfe/woSqc=; b=n7XAvZfiuflRyWtpqEL1S0UwvLBDroOZEaPXFEW+tTeWNX/Xk6mqtB23HHqNoxdx0q IB9Mwyr9Q8WuLV9+KGItMMfkESPjEwCemLO4naKZ+QN3EGUDnipQbk/eCYXrAzmAgYr2 zIy3kj7dfKOQfqlnqhvHmwhV8Ec3VniJFEToRnlN1xOqKxBjIcO4BZwBX3BxAJTL4ea0 wmot+beDUWmR5gXIesPf+s1vo0g0hGMjamqeqXGK2JoWqNFer8Td30HD2kAI5P9Ug6T5 u/OyJ7LsnDdaCU9keygaIolS+HeB3RVIQvcOHKPb0KZbETUjR/ZrT0JGStSP+4pyksfM Futw== X-Gm-Message-State: AOJu0YwVblvC/i3THPdaPVBS0B08Sx2g10ZZ/uMy1l0DHEFzNAv/875O xdInd9wxrduQPHw6BfU1MaQ= X-Google-Smtp-Source: AGHT+IFDbhxZGYpA5HCByF4Qb5PE1vX1pe1NX0b5BcnVPjoECL4EjXrqGNzxgC12V/c4xrGb9ccW1A== X-Received: by 2002:a2e:8097:0:b0:2bb:aaec:abad with SMTP id i23-20020a2e8097000000b002bbaaecabadmr14968869ljg.30.1696867606530; Mon, 09 Oct 2023 09:06:46 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id j22-20020a2e8256000000b002b6daa3fa2csm2019715ljh.69.2023.10.09.09.06.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:06:46 -0700 (PDT) From: Sergey Organov To: Junio C Hamano Cc: git@vger.kernel.org, Elijah Newren , Sergey Organov Subject: [PATCH v4 3/3] completion: complete '--dd' Date: Mon, 9 Oct 2023 19:05:35 +0300 Message-Id: <20231009160535.236523-4-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231009160535.236523-1-sorganov@gmail.com> References: <20230909125446.142715-1-sorganov@gmail.com> <20231009160535.236523-1-sorganov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org '--dd' only makes sense for 'git log' and 'git show', so add it to __git_log_show_options which is referenced in the completion for these two commands. Signed-off-by: Sergey Organov --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 133ec92bfae7..ca4fa39f3ff8 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2042,7 +2042,7 @@ __git_log_shortlog_options=" " # Options accepted by log and show __git_log_show_options=" - --diff-merges --diff-merges= --no-diff-merges --remerge-diff + --diff-merges --diff-merges= --no-diff-merges --dd --remerge-diff " __git_diff_merges_opts="off none on first-parent 1 separate m combined c dense-combined cc remerge r"