git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: Junio C Hamano <gitster@pobox.com>,
	 "Osipov, Michael (IN IT IN)" <michael.osipov@innomotics.com>,
	git@vger.kernel.org
Subject: Re: [RFC PATCH] bisect: Honor log.date
Date: Thu, 28 Mar 2024 17:38:18 -0400	[thread overview]
Message-ID: <CAPig+cSKbGW57dh13T6p20B_EY_C4K=LiQ3TP59wheMSi4qsQA@mail.gmail.com> (raw)
In-Reply-To: <4727b78c-e45b-da7c-fa6e-85876b50dcde@softwolves.pp.se>

On Thu, Mar 28, 2024 at 4:54 PM Peter Krefting <peter@softwolves.pp.se> wrote:
> When bisect finds the target commit to display, it calls git diff-tree
> to do so. This is a plumbing command that is not affected by the user's
> log.date setting. Switch to instead use "git show", which does honor
> it.
>
> Reported-by: Michael Osipov <michael.osipov@innomotics.com>
> Signed-off-By: Peter Krefting <peter@softwolves.pp.se>
> ---
> diff --git a/bisect.c b/bisect.c
> @@ -959,23 +959,19 @@ static enum bisect_error check_good_are_ancestors_of_bad(struct repository *r,
> +       /* Invoke "git show --pretty=medium --shortstat --no-abbrev-commit --no-patch $object" */
> +       strvec_pushl(&show.args, "show", "--pretty=medium", "--shortstat", "--no-abbrev-commit", "--no-patch",
> +                    oid_to_hex(&commit->object.oid), NULL);
> +       show.git_cmd = 1;

Nit: The comment doesn't tell the reader anything that the code itself
isn't already clearly telling the reader, thus the comment is
redundant and unnecessary. Moreover, the comment is likely to become
outdated when people adjust the code but forget to update the comment.
As such, I'd recommend dropping the comment altogether.

  reply	other threads:[~2024-03-28 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 11:07 bisect does not respect 'log.date' Osipov, Michael (IN IT IN)
2024-03-13 18:24 ` Junio C Hamano
2024-03-13 19:26   ` Osipov, Michael (IN IT IN)
2024-03-25 20:27     ` Peter Krefting
2024-03-25 21:49       ` Junio C Hamano
2024-03-28 20:53         ` [RFC PATCH] bisect: Honor log.date Peter Krefting
2024-03-28 21:38           ` Eric Sunshine [this message]
2024-03-28 23:18             ` Peter Krefting

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cSKbGW57dh13T6p20B_EY_C4K=LiQ3TP59wheMSi4qsQA@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=michael.osipov@innomotics.com \
    --cc=peter@softwolves.pp.se \
    /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.
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 NNTP newsgroup(s).