From: Junio C Hamano <gitster@pobox.com>
To: Sergey Organov <sorganov@gmail.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH 2/3] doc/git-log: describe --diff-merges=off
Date: Tue, 11 Aug 2020 17:06:56 -0700 [thread overview]
Message-ID: <xmqq8sek917j.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200805220832.3800-3-sorganov@gmail.com> (Sergey Organov's message of "Thu, 6 Aug 2020 01:08:31 +0300")
Sergey Organov <sorganov@gmail.com> writes:
> Signed-off-by: Sergey Organov <sorganov@gmail.com>
> ---
> Documentation/git-log.txt | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
> index 9ccba65469d7..f3727c786453 100644
> --- a/Documentation/git-log.txt
> +++ b/Documentation/git-log.txt
> @@ -145,7 +145,6 @@ combined-diff option or with `--no-diff-merges`).
> rename or copy detection have been requested).
>
> -m::
> ---diff-merges::
Shouldn't this "--diff-merges" be removed from here? As [1/3]
updated it like so:
- } else if (!strcmp(arg, "-m") || !strcmp(arg, "--diff-merges")) {
+ } else if (!strcmp(arg, "-m")) {
revs->ignore_merges = 0;
+ } else if ((argcount = parse_long_opt("diff-merges", argv, &optarg))) {
+ if (!strcmp(optarg, "off")) {
+ revs->ignore_merges = 1;
+ } else {
+ die(_("unknown value for --diff-merges: %s"), optarg);
+ }
+ return argcount;
"git log --diff-merges" would get either an "option --diff-merges
requires a value" error from diff.c::parse_long_opt(), or an
"unknown value for --diff-merges: <opt>" error from the above code.
Other than that, I think 1&2/3 looks good, and we've covered the
tests with 3/3 already, so we are in a reasonably good shape.
Thanks.
> This flag makes the merge commits show the full diff like
> regular commits; for each merge parent, a separate log entry
> and diff is generated. An exception is that only diff against
> @@ -153,6 +152,11 @@ combined-diff option or with `--no-diff-merges`).
> in that case, the output represents the changes the merge
> brought _into_ the then-current branch.
>
> +--diff-merges=off::
> +--no-diff-merges::
> + Disable output of diffs for merge commits (default). Useful to
> + override `-m`, `-c`, or `--cc`.
> +
> :git-log: 1
> include::diff-options.txt[]
next prev parent reply other threads:[~2020-08-12 0:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 22:08 [PATCH 0/3] Change "--diff-merges" to require parameter Sergey Organov
2020-08-05 22:08 ` [PATCH 1/3] revision: change "--diff-merges" option " Sergey Organov
2020-08-05 22:08 ` [PATCH 2/3] doc/git-log: describe --diff-merges=off Sergey Organov
2020-08-12 0:06 ` Junio C Hamano [this message]
2020-08-12 0:48 ` Junio C Hamano
2020-08-12 8:08 ` Sergey Organov
2020-08-05 22:08 ` [PATCH 3/3] t/t4013: add test for --diff-merges=off Sergey Organov
2020-08-05 22:31 ` Junio C Hamano
2020-08-05 22:44 ` Sergey Organov
2020-08-05 23:19 ` Junio C Hamano
2020-08-05 23:44 ` Junio C Hamano
2020-08-06 8:34 ` Sergey Organov
2020-08-06 17:10 ` Junio C Hamano
2020-08-06 20:52 ` Sergey Organov
2020-08-07 23:11 ` Sergey Organov
2020-08-17 17:17 ` Junio C Hamano
2020-08-17 20:36 ` Sergey Organov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq8sek917j.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sorganov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).