<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.h, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-03-19T16:54:56Z</updated>
<entry>
<title>Merge branch 'bk/run-command-wo-the-repository'</title>
<updated>2026-03-19T16:54:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-19T16:54:55Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a7a079c2c4bc7b269229a6ea6c147b6b2d5b2684'/>
<id>urn:sha1:a7a079c2c4bc7b269229a6ea6c147b6b2d5b2684</id>
<content type='text'>
The run_command() API lost its implicit dependencyon the singleton
`the_repository` instance.

* bk/run-command-wo-the-repository:
  run-command: wean auto_maintenance() functions off the_repository
  run-command: wean start_command() off the_repository
</content>
</entry>
<entry>
<title>Merge branch 'ds/for-each-repo-w-worktree'</title>
<updated>2026-03-12T21:09:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-12T21:09:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=03161747b412fe739d8a7ef631769b3d8f60d56f'/>
<id>urn:sha1:03161747b412fe739d8a7ef631769b3d8f60d56f</id>
<content type='text'>
"git for-each-repo" started from a secondary worktree did not work
as expected, which has been corrected.

* ds/for-each-repo-w-worktree:
  for-each-repo: simplify passing of parameters
  for-each-repo: work correctly in a worktree
  run-command: extract sanitize_repo_env helper
  for-each-repo: test outside of repo context
</content>
</entry>
<entry>
<title>run-command: wean auto_maintenance() functions off the_repository</title>
<updated>2026-03-12T15:30:57Z</updated>
<author>
<name>Burak Kaan Karaçay</name>
<email>bkkaracay@gmail.com</email>
</author>
<published>2026-03-12T14:44:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033'/>
<id>urn:sha1:9df3be8e2e7e2c9bf200de4bcfbd4e690a57f033</id>
<content type='text'>
The prepare_auto_maintenance() relies on the_repository to read
configurations. Since run_auto_maintenance() calls
prepare_auto_maintenance(), it also implicitly depends the_repository.

Add 'struct repository *' as a parameter to both functions and update
all callers to pass the_repository.

With no global repository dependencies left in this file, remove the
USE_THE_REPOSITORY_VARIABLE macro.

Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Burak Kaan Karaçay &lt;bkkaracay@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: wean start_command() off the_repository</title>
<updated>2026-03-12T15:30:57Z</updated>
<author>
<name>Burak Kaan Karaçay</name>
<email>bkkaracay@gmail.com</email>
</author>
<published>2026-03-12T14:44:36Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=05c324b92fe723674cbf9ae1b0b1675821b6c275'/>
<id>urn:sha1:05c324b92fe723674cbf9ae1b0b1675821b6c275</id>
<content type='text'>
The start_command() relies on the_repository due to the
close_object_store flag in 'struct child_process'. When this flag is
set, start_command() closes the object store associated with
the_repository before spawning a child process.

To eliminate this dependency, replace the 'close_object_store' with the
new 'struct object_database *odb_to_close' field. This allows callers to
specify the object store that needs to be closed.

Suggested-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Burak Kaan Karaçay &lt;bkkaracay@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: extract sanitize_repo_env helper</title>
<updated>2026-03-03T18:19:59Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-03-03T17:31:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5f031fe4f14b5cc754daaf24534dbe0c6647fcca'/>
<id>urn:sha1:5f031fe4f14b5cc754daaf24534dbe0c6647fcca</id>
<content type='text'>
The current prepare_other_repo_env() does two distinct things:

 1. Strip certain known environment variables that should be set by a
    child process based on a different repository.

 2. Set the GIT_DIR variable to avoid repository discovery.

The second item is valuable for child processes that operate on
submodules, where the repo discovery could be mistaken for the parent
repository.

In the next change, we will see an important case where only the first
item is required as the GIT_DIR discovery should happen naturally from
the '-C' parameter in the child process.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: add stdin callback for parallelization</title>
<updated>2026-01-28T23:47:02Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2026-01-28T21:39:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ec0becacc9847406f2b0147a81f62e023b006351'/>
<id>urn:sha1:ec0becacc9847406f2b0147a81f62e023b006351</id>
<content type='text'>
If a user of the run_processes_parallel() API wants to pipe a large
amount of information to the stdin of each parallel command, that
data could exceed the pipe buffer of the process's stdin and can be
too big to store in-memory via strbuf &amp; friends or to slurp to a file.

Generally this is solved by repeatedly writing to child_process.in
between calls to start_command() and finish_command(). For a specific
pre-existing example of this, see transport.c:run_pre_push_hook().

This adds a generic callback API to run_processes_parallel() to do
exactly that in a unified manner, similar to the existing callback APIs,
which can then be used by hooks.h to convert the remaining hooks to the
new, simpler parallel interface.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Adrian Ratiu &lt;adrian.ratiu@collabora.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Revert "Merge branch 'ar/run-command-hook'"</title>
<updated>2026-01-15T21:02:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-01-15T19:12:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a3d1f391d35762162356201028fb73774a6c4a8b'/>
<id>urn:sha1:a3d1f391d35762162356201028fb73774a6c4a8b</id>
<content type='text'>
This reverts commit f406b8955295d01089ba2baf35eceadff2d11cae,
reversing changes made to 1627809eeff75e6ec936fc609e7be46d5eb2fa9e.

It seems to have caused a few regressions, two of the three known
ones we have proposed solutions for.  Let's give ourselves a bit
more room to maneuver during the pre-release freeze period and
restart once the 2.53 ships.
</content>
</entry>
<entry>
<title>run-command: allow capturing of collated output</title>
<updated>2025-12-28T05:02:07Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2025-12-26T12:23:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5ab5872a53296b009cca43d412efd1a74ea4f149'/>
<id>urn:sha1:5ab5872a53296b009cca43d412efd1a74ea4f149</id>
<content type='text'>
Some callers, for example server-side hooks which wish to relay hook
output to clients across a transport, want to capture what would
normally print to stderr and do something else with it. Allow that via a
callback.

By calling the callback regardless of whether there's output available,
we allow clients to send e.g. a keepalive if necessary.

Because we expose a strbuf, not a fd or FILE*, there's no need to create
a temporary pipe or similar - we can just skip the print to stderr and
instead hand it to the caller.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Adrian Ratiu &lt;adrian.ratiu@collabora.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: add stdin callback for parallelization</title>
<updated>2025-12-28T05:02:06Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2025-12-26T12:23:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=23a720e96b98cb492077a2d23107df31dbc17a96'/>
<id>urn:sha1:23a720e96b98cb492077a2d23107df31dbc17a96</id>
<content type='text'>
If a user of the run_processes_parallel() API wants to pipe a large
amount of information to the stdin of each parallel command, that
data could exceed the pipe buffer of the process's stdin and can be
too big to store in-memory via strbuf &amp; friends or to slurp to a file.

Generally this is solved by repeatedly writing to child_process.in
between calls to start_command() and finish_command(). For a specific
pre-existing example of this, see transport.c:run_pre_push_hook().

This adds a generic callback API to run_processes_parallel() to do
exactly that in a unified manner, similar to the existing callback APIs,
which can then be used by hooks.h to convert the remaining hooks to the
new, simpler parallel interface.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Adrian Ratiu &lt;adrian.ratiu@collabora.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: fix a typo</title>
<updated>2024-09-19T20:46:12Z</updated>
<author>
<name>Andrew Kreimer</name>
<email>algonell@gmail.com</email>
</author>
<published>2024-09-19T18:34:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b71d52cef598521865eb9d8cf9f7a95e685a76aa'/>
<id>urn:sha1:b71d52cef598521865eb9d8cf9f7a95e685a76aa</id>
<content type='text'>
Fix a typo in comments.

Signed-off-by: Andrew Kreimer &lt;algonell@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
