git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: "Osipov, Michael (IN IT IN)" <michael.osipov@innomotics.com>,
	git@vger.kernel.org
Subject: Re: bisect does not respect 'log.date'
Date: Mon, 25 Mar 2024 14:49:46 -0700	[thread overview]
Message-ID: <xmqq1q7ygex1.fsf@gitster.g> (raw)
In-Reply-To: <25d716fa-bd32-4ff0-20f2-05ff51750911@softwolves.pp.se> (Peter Krefting's message of "Mon, 25 Mar 2024 21:27:30 +0100 (CET)")

Peter Krefting <peter@softwolves.pp.se> writes:

> The question is what is the correct way of fixing this; is it to make
> "git diff-tree --pretty" respect the "log.date" option, or to make

The "diff-tree" and other "plumbing" commands deliberately ignore
configuration and the point of doing so is to make sure their output
are stable without getting affected by the end-user configuration.

> "git bisect" pass a --date pate parameter to the invocation of it?

If we were to change how "bisect" reports the date of the commit,
this is a more reasonable route to go.

Are you sure that nobody is driving "git bisect" from a script and
scraping the output in such a way that a change in the output format
would break such a script?  I would say it is unlikely (they may be
scraping the output to find a commit by looking for 40-hex string,
though) that it would cause such a breakage.

But stepping back a bit.

If "git bisect" were written in the more modern era, I am reasonably
sure that it wouldn't have used "git diff-tree" when reporting the
"first bad commit".  It would have used "git show" instead, which is
at the Porcelain level and will pay attention to the configuration
variables.  Instead of focusing too narrowly on the log.date option,
that would only tweak the date format, it may be a more fruitful way
to invest brainwaves in to consider the feasibility of switching to
use "git show" there.



  reply	other threads:[~2024-03-25 21:50 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 [this message]
2024-03-28 20:53         ` [RFC PATCH] bisect: Honor log.date Peter Krefting
2024-03-28 21:38           ` Eric Sunshine
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

  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=xmqq1q7ygex1.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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.
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).