From patchwork Wed Oct 4 21:45:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13409475 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 6ECA3E936EA for ; Wed, 4 Oct 2023 21:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244039AbjJDVqc (ORCPT ); Wed, 4 Oct 2023 17:46:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243958AbjJDVq1 (ORCPT ); Wed, 4 Oct 2023 17:46:27 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31770C6 for ; Wed, 4 Oct 2023 14:46:22 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-32336a30d18so277801f8f.2 for ; Wed, 04 Oct 2023 14:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696455980; x=1697060780; 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=wwULGC8BAfLATKKheQRRpOJp8nqzM2A6Zm3K6cZnB8o=; b=eDEtQ5Z0LVWy4hZCzsaLAoWFHSkAy1Kt7KfRNeA7DGgDrpnAuf2Lgz5JzuVzMFxYCv InWVM1DWrFIYXDVkeMmXvR1JKlXEOL1S48P1JkxCROml1L1u/3yPsubXQRnMoUuZ5kwF UiHIu3PtjQpS2T30aKXcSSYOTL11hkiyPu0uQbdrQLMQ8k5vJPTFrQqfGOKV4kMFXtsk zeH9LtMiyhIqud8AdDG8154WsVByfDu96Y7Fx9r1m5qqhbO4VhBDdSpR/3a4bkuhi+d4 JqRGm+B9yR10s46PDDxRvj2gGkqpQ4a6qzDIkWwQWyzGlfVH2mtEATkKClaYwormFLOa 9YBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696455980; x=1697060780; 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=wwULGC8BAfLATKKheQRRpOJp8nqzM2A6Zm3K6cZnB8o=; b=uX/R6OEIvDD4n2miY55G1/xc+7heZ7MQZ2LAlvIdZvUf2dV8W/kZHpD8Qr6+JhxZ1M ZzELJ0MZDnTZZl80pLnBqWFxzNKIGiVkj3WQuxhw+qoOJ4w0YDP+Tw9qX1OR0KZXry5I FhmbAay0KrdCAtytbvLu3nc1egjg1vneiFI7dOrfG9qmGiakH6go0g85L7rtATIIfl/S of7liRL42qB40UiqHQTUepikVtWdX0x2cVAXLjpCEsoy/KVrlz8lPyfqU2ajnWJ+rfm3 Mfa0f3clnkR0+XVSga+Ezve05mNEXHyaVe0/pIq4Efa4Zo103LCXeQKpjXidjzALH9Om Hnsg== X-Gm-Message-State: AOJu0YwFwWWEobDoAAYSVbreKN6BJBb/dj239RjtD07zcRyWR2YM6T9p Jt4wSWqHt90NL3bILLFAuJw= X-Google-Smtp-Source: AGHT+IF9iYHtfT8f7hZ1Ea0BNf7wJV/ObnaNSNElipeKg73gu1S1NUGnRGBz4PNHfKT7vWgE4PavLw== X-Received: by 2002:adf:e7c1:0:b0:323:2f16:66ee with SMTP id e1-20020adfe7c1000000b003232f1666eemr2788368wrn.71.1696455980363; Wed, 04 Oct 2023 14:46:20 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id r25-20020a2e9959000000b002bfba0d26bcsm7818ljj.8.2023.10.04.14.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 14:46:20 -0700 (PDT) From: Sergey Organov To: Junio C Hamano Cc: git@vger.kernel.org, Sergey Organov Subject: [PATCH v3 1/3] diff-merges: improve --diff-merges documentation Date: Thu, 5 Oct 2023 00:45:56 +0300 Message-Id: <20231004214558.210339-2-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231004214558.210339-1-sorganov@gmail.com> References: <20230909125446.142715-1-sorganov@gmail.com> <20231004214558.210339-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 | 98 ++++++++++++++++++---------------- Documentation/git-log.txt | 2 +- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 9f33f887711d..8035210c1418 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' (which see) 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 diff against re-merge. + 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 +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 parameter, which 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 Wed Oct 4 21:45:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13409474 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 59368E936E9 for ; Wed, 4 Oct 2023 21:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244007AbjJDVqb (ORCPT ); Wed, 4 Oct 2023 17:46:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243992AbjJDVq1 (ORCPT ); Wed, 4 Oct 2023 17:46:27 -0400 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 DD17BC9 for ; Wed, 4 Oct 2023 14:46:22 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3214cdb4b27so318101f8f.1 for ; Wed, 04 Oct 2023 14:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696455981; x=1697060781; 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=LFcPxuW7u7Z0GBMNFlSj1Uiqe2G5+FSgsPLc+oB4fS0=; b=j23sOdPDXKDpRYjRhr6ZXgv2NGXLOXhjYrGkomShSFAKKTGMd/mCyssqbkVNVo/d/u zuEd21Z4wb7sz2DYAjakA9/QFiubCByet1sr2jXoG7jTma83Gr+RqLP2PEzhcTc2qqVY w9vflVLyybq/kKsYONsJOpI8WKvzUz6c0tdJCa+Mt/M9LG+VVqOBsPuu35f4xTd1JbwZ +W8DuwT/9C1I7KHK0wbIl+naH7bwQbYHUdm9L6jO75nAgfc5Axf5QKqEpb1zixD0RM7n OaYYS9OTdgO+RdGORvSSdMh+AvKNtzYq4D3qZ/oKyEJhqdbdhjXin6vODDRKG0Xwyj3b iIZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696455981; x=1697060781; 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=LFcPxuW7u7Z0GBMNFlSj1Uiqe2G5+FSgsPLc+oB4fS0=; b=deaWoE/VueXa2jQHOV3fZODDAO5PZ3hk7mBbFXBLZzPsZGw8wXv+iegvzKBnTSJGLj p8mObSok2RJax8aeBt3/vOZdi+00KzBYT21r1B8NWWFsGasHRPSI2C0aNnQx1DvADirl 4oLdrmbNouaDqTuCDBQOtV7H86I5cNqAT52m1BOQOqTGME5YnBdAjvU/+fELSItAhaia obro91k/iIBFFchd2SeC33mHuGP4AYodaKi7Gfr/jVPWX76e8YL4xmKsnyQYovESbeMQ ilaJRTk2d/XomrmQUPv1YXetEIQei2T9QLUvdA8/MbaA5gPx8ZvIPW0VXO8GGAueajyB CPqw== X-Gm-Message-State: AOJu0Yzf1Zc4mDdZyVTmJ5oXTF4zCirl7hLdnIcw+WMEO+3rP7RHeW7u lFtwr+sd8vDr2H83eHEEmmnngN44sYM= X-Google-Smtp-Source: AGHT+IFRxXuKoUG4/OqsS9CKuLb/hkeOLJIoyFfJRuzQ0EuuXrb2Dqvq5+1fJoW1EGgcXN9P8PCyOw== X-Received: by 2002:a5d:6447:0:b0:31f:fb5d:96da with SMTP id d7-20020a5d6447000000b0031ffb5d96damr3481481wrw.64.1696455981028; Wed, 04 Oct 2023 14:46:21 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id r25-20020a2e9959000000b002bfba0d26bcsm7818ljj.8.2023.10.04.14.46.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 14:46:20 -0700 (PDT) From: Sergey Organov To: Junio C Hamano Cc: git@vger.kernel.org, Sergey Organov Subject: [PATCH v3 2/3] diff-merges: introduce '--dd' option Date: Thu, 5 Oct 2023 00:45:57 +0300 Message-Id: <20231004214558.210339-3-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231004214558.210339-1-sorganov@gmail.com> References: <20230909125446.142715-1-sorganov@gmail.com> <20231004214558.210339-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". NOTE: originally proposed as '-d', and renamed to '--dd' due to Junio request to keep "short-and-sweet" '-d' reserved for other uses. 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 8035210c1418..f80d493dd4c8 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 diff against re-merge. 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 Wed Oct 4 21:45:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Organov X-Patchwork-Id: 13409477 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 7E36AE936E7 for ; Wed, 4 Oct 2023 21:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244053AbjJDVqd (ORCPT ); Wed, 4 Oct 2023 17:46:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233829AbjJDVq1 (ORCPT ); Wed, 4 Oct 2023 17:46:27 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8BF5D7 for ; Wed, 4 Oct 2023 14:46:23 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c1854bebf5so3732441fa.1 for ; Wed, 04 Oct 2023 14:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696455982; x=1697060782; 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=kBUm0Mdr2ER1vMYf7phDAZ/bouPAQQXDzonxU8trMMdCVP26lIDFOgnFVnUvgteiyW JIEwHpVsx0RfXjweO1sSXoNed1oYNbycxhi4sCScLaZNDfFhT2kYIsVfZMZ+9SbopxYs i3e5D3E7lhdMP5nh1NCfJDJwscyjTK0r+WHagduvL0tv/xOzHKTQsRtdStzhAk0vBpSq vhA2j/LUXJaQ8jWpPujuIBAH+CuJFiuGuG9LZd6j/5XWr/ly/0qYYtb74tPXZF0/ufbd RywF8GXWImvw1jBSD+3gsV24YOXzjfm09K5Euvmog0i4H6K0xK4HY0djeCPJ74yLrKE3 nIVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696455982; x=1697060782; 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=w5jNh4gkvsk4ImpTDGudMOwRNRvgtc73tX9DalFjy4iuURqkifOfDwT/DxvFm0FLHF r0Fo68qgfaSgjwIqhMEB3FdZJjnhGGc+X2UUqJPAqf3Dajsv5mWt605w27dXU6gnxAmW MM52ZSSfpaVzRGhZ/upSDSW0N545v95bSoZSBp8gGkmAk8nqBnjEWEWERgtWrZ7RRq1U YMoqHfeBAt0263wMbvVYI5Mlh+BOnVwq4qTwJDNUrURGvMphVButeV5inAarm2h6hJga XYgP15pMbTem0Hx1ToCvKCaO8jMoQRBPFIJ9vYhCYV3kC2Xishve6/I5ImvUo96q++WL JLmw== X-Gm-Message-State: AOJu0Yz4V5YELqS/QWdTTRECqc0u6RvVFkj3LZ7WgbeysFdcvUt0x52P 9wbwsWFwS5fMMBZHey5A12U= X-Google-Smtp-Source: AGHT+IF8/khzyWGgWdCSgx68inyCip0bNjsg6hUp/9BEoa4w+dnSDIDPYB2s+km2hcS6ttIidEBmqQ== X-Received: by 2002:a2e:7c15:0:b0:2b6:e2e4:7d9a with SMTP id x21-20020a2e7c15000000b002b6e2e47d9amr3297414ljc.38.1696455981775; Wed, 04 Oct 2023 14:46:21 -0700 (PDT) Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id r25-20020a2e9959000000b002bfba0d26bcsm7818ljj.8.2023.10.04.14.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 14:46:21 -0700 (PDT) From: Sergey Organov To: Junio C Hamano Cc: git@vger.kernel.org, Sergey Organov Subject: [PATCH v3 3/3] completion: complete '--dd' Date: Thu, 5 Oct 2023 00:45:58 +0300 Message-Id: <20231004214558.210339-4-sorganov@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231004214558.210339-1-sorganov@gmail.com> References: <20230909125446.142715-1-sorganov@gmail.com> <20231004214558.210339-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"