git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Peter Krefting <peter@softwolves.pp.se>,
	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: Tue, 16 Apr 2024 13:01:34 +0200	[thread overview]
Message-ID: <CAP8UFD0W7PUHTg2NwuVkQJik2+HqTDF6KRZZ8tA_dW7-YZtsbQ@mail.gmail.com> (raw)
In-Reply-To: <20240401023225.GA2639800@coredump.intra.peff.net>

On Mon, Apr 1, 2024 at 4:32 AM Jeff King <peff@peff.net> wrote:

> I guess that commit is what brought me into the cc. I have not been
> following this topic too closely, but generally I'm in favor of using
> "git show". I even suggested it back then, but I think Christian
> preferred not using an external process if we could avoid it.
>
> The thread from 2019 is here:
>
>   http://lore.kernel.org/git/20190222061949.GA9875@sigill.intra.peff.net
>
> which links to the earlier discussion about "git show":
>
>   https://lore.kernel.org/git/CAP8UFD3QhTUj+j3vBGrm0sTQ2dSOLS-m2_PwFj6DZS4VZHKRTQ@mail.gmail.com/
>
> IMHO this config thing is a good example of the strength of the separate
> "show" process. If our goal is to trigger all the niceties of "git
> show", it is tricky to catch them all. The revision machinery is pretty
> reusable, but there's no easy way to figure out which config affects
> git-show and so on. Of course if we had a way to invoke git-show
> in-process that would work, but I suspect there are unexpected corner
> cases that might trigger.

Sorry for not following the topic closely and for replying to this so
late, but I think that by now we should have some kind of guidelines
about when forking a new process is Ok and when it's not.

It seems to me that there was already some amount of back and forth on
this topic when bisect and other shell commands were ported to C a
long time ago. There weren't clearly written guidelines, but it seems
to me that at that time we thought that forking a new process was
generally bad, especially for performance reasons, but also because
they showed a bad example and didn't go in the right direction. It
seems to me that people who reviewed code that ported some commands to
C sometimes asked contributors to not fork processes, and efforts were
made by contributors, like GSoC or Outreachy contributors I mentored,
to go in this direction. At one point there was even a microproject
about replacing code that forked a process with function calls.

These days there are also talks and patches around about libification
and about passing around a "repository" variable and other such
variables, so that C code does not need to fork processes to be able
to work more broadly, for example in submodules. And again it seems to
me that such changes (adding code which starts a new process to
replace code which doesn't) doesn't go in the same direction as the
libification and similar goals.


  parent reply	other threads:[~2024-04-16 11:02 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 [this message]
2024-04-16 15:42           ` Junio C Hamano
2024-04-16 19:53             ` Peter Krefting
2024-04-20 17:13               ` Junio C Hamano

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=CAP8UFD0W7PUHTg2NwuVkQJik2+HqTDF6KRZZ8tA_dW7-YZtsbQ@mail.gmail.com \
    --to=christian.couder@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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).