git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] bisect: Honor log.date

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 28, 2024, 21:38 UTC
Message-ID
<CAPig+cSKbGW57dh13T6p20B_EY_C4K=LiQ3TP59wheMSi4qsQA@mail.gmail.com>
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:
Show 14 quoted lines
> 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.
Previous: Peter KreftingNext: Peter Krefting
Message 7 of 8 in “bisect does not respect 'log.date'”
  1. Osipov, Michael (IN IT IN)Mar 13, 2024
  2. Junio C HamanoMar 13, 2024
  3. Osipov, Michael (IN IT IN)Mar 13, 2024
  4. Peter KreftingMar 25, 2024
  5. Junio C HamanoMar 25, 2024
  6. bisect: Honor log.datePeter Krefting, Mar 28, 2024
  7. Eric SunshineMar 28, 2024
  8. Peter KreftingMar 28, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.