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: Christian Couder <christian.couder@gmail.com>,
	 Jeff King <peff@peff.net>,
	 git@vger.kernel.org,  "Osipov,
	Michael (IN IT IN)" <michael.osipov@innomotics.com>,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v2] bisect: Honor log.date
Date: Sat, 20 Apr 2024 10:13:58 -0700	[thread overview]
Message-ID: <xmqqjzks3qjt.fsf@gitster.g> (raw)
In-Reply-To: <4f0456c0-e926-ee60-4e14-6b8ed80d2ace@softwolves.pp.se> (Peter Krefting's message of "Tue, 16 Apr 2024 20:53:40 +0100 (CET)")

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

> In this particular case, calling "git show" is really the last thing
> we want to do; so if we can move the cleanup that happens after it
> (that ends the bisect), it should be able to just take over the
> current process with a call to show, without needing to re-exec.

The cmd_foo() functions are also expected to either return to their
callers or call exit() themselves, and it is true that as the very
last step before giving the control back to the end-user in the
current "bisect" process, we could make an internal call to
cmd_foo() and let it exit with its own exit status.

But that is only the latter half of a story.

The cmd_show() (or any cmd_foo() in general) function expects to
start from within a pristine environment.  Calling them _after_
somebody else (in this case everything called from cmd_bisect())
clobbered the global state may or may not work (and in general we
should assume it would not work) correctly.

The outline of the envisioned end state of libification I gave was
about an arrangement to ensure that we can give such an pristine
state when we make a call to such "top level" entry point of "foo"
command (in this case, "show"), from a different command (in this
case, "bisect").  It is very much orthogonal to what you are talking
about, I think.  We need both.

> And calling back to the libification question, I would see this part
> of the bisect command to be something that would run *on top of* the
> library (with possibly an API to poke bad/good states into it), so I
> don't think that objection holds for this particular case.

There was no objection.  I was just pointing out that the infrastructure
is not ready to do so.


      reply	other threads:[~2024-04-20 17:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30 23:10 [PATCH v2] bisect: Honor log.date Peter Krefting
2024-03-31  2:14 ` Junio C Hamano
2024-03-31 17:10   ` Peter Krefting
2024-03-31 22:58     ` Junio C Hamano
2024-04-01  2:32       ` Jeff King
2024-04-01 15:50         ` Peter Krefting
2024-04-01 16:32           ` Jeff King
2024-04-01 17:03             ` Junio C Hamano
2024-04-03  1:27               ` Jeff King
2024-04-16 11:01         ` Christian Couder
2024-04-16 15:42           ` Junio C Hamano
2024-04-16 19:53             ` Peter Krefting
2024-04-20 17:13               ` Junio C Hamano [this message]

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=xmqqjzks3qjt.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=michael.osipov@innomotics.com \
    --cc=peff@peff.net \
    --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).