<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.h, branch v2.45.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.45.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.45.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-04-17T15:42:26Z</updated>
<entry>
<title>run-command: introduce function to prepare auto-maintenance process</title>
<updated>2024-04-17T15:42:26Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-04-17T06:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b396ee6bed7882af3333eb52333f8a34b648437d'/>
<id>urn:sha1:b396ee6bed7882af3333eb52333f8a34b648437d</id>
<content type='text'>
The `run_auto_maintenance()` function is responsible for spawning a new
`git maintenance run --auto` process. To do so, it sets up the `sturct
child_process` and then runs it by executing `run_command()` directly.
This is rather inflexible in case callers want to modify the child
process somewhat, e.g. to redirect stderr or stdout.

Introduce a new `prepare_auto_maintenance()` function to plug this gap.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cache.h: remove this no-longer-used header</title>
<updated>2023-06-21T20:39:53Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-05-16T06:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc5c5ec0446895f5c4139cd470066beb3c4ac6d5'/>
<id>urn:sha1:bc5c5ec0446895f5c4139cd470066beb3c4ac6d5</id>
<content type='text'>
Since this header showed up in some places besides just #include
statements, update/clean-up/remove those other places as well.

Note that compat/fsmonitor/fsm-path-utils-darwin.c previously got
away with violating the rule that all files must start with an include
of git-compat-util.h (or a short-list of alternate headers that happen
to include it first).  This change exposed the violation and caused it
to stop building correctly; fix it by having it include
git-compat-util.h first, as per policy.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command.h: move declarations for run-command.c from cache.h</title>
<updated>2023-06-21T20:39:53Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-05-16T06:33:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64c8559575a2d91bad66a3c0a7067d9275dd5905'/>
<id>urn:sha1:64c8559575a2d91bad66a3c0a7067d9275dd5905</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/no-more-run-command-v'</title>
<updated>2022-11-08T22:15:12Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2022-11-08T22:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be4ac3b197f8b4070bdad65dea4a03e1389410a6'/>
<id>urn:sha1:be4ac3b197f8b4070bdad65dea4a03e1389410a6</id>
<content type='text'>
Simplify the run-command API.

* rs/no-more-run-command-v:
  replace and remove run_command_v_opt()
  replace and remove run_command_v_opt_cd_env_tr2()
  replace and remove run_command_v_opt_tr2()
  replace and remove run_command_v_opt_cd_env()
  use child_process members "args" and "env" directly
  use child_process member "args" instead of string array variable
  sequencer: simplify building argument list in do_exec()
  bisect--helper: factor out do_bisect_run()
  bisect: simplify building "checkout" argument list
  am: simplify building "show" argument list
  run-command: fix return value comment
  merge: remove always-the-same "verbose" arguments
</content>
</entry>
<entry>
<title>replace and remove run_command_v_opt()</title>
<updated>2022-10-30T18:04:51Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ddbb47fde9b6d8cd9f3728847a378f634318cfb1'/>
<id>urn:sha1:ddbb47fde9b6d8cd9f3728847a378f634318cfb1</id>
<content type='text'>
Replace the remaining calls of run_command_v_opt() with run_command()
calls and explict struct child_process variables.  This is more verbose,
but not by much overall.  The code becomes more flexible, e.g. it's easy
to extend to conditionally add a new argument.

Then remove the now unused function and its own flag names, simplifying
the run-command API.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>replace and remove run_command_v_opt_cd_env_tr2()</title>
<updated>2022-10-30T18:04:50Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:53:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef249b398e26dd76f473ce83a35219c520f6fdbe'/>
<id>urn:sha1:ef249b398e26dd76f473ce83a35219c520f6fdbe</id>
<content type='text'>
The convenience function run_command_v_opt_cd_env_tr2() has no external
callers left.  Inline it and remove it from the API.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>replace and remove run_command_v_opt_tr2()</title>
<updated>2022-10-30T18:04:48Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:52:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d82dbbd849fadd9d61d9489a03b429b6d1413c81'/>
<id>urn:sha1:d82dbbd849fadd9d61d9489a03b429b6d1413c81</id>
<content type='text'>
The convenience function run_command_v_opt_tr2() is only used by a
single caller.  Use struct child_process and run_command() directly
instead and remove the underused function.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>replace and remove run_command_v_opt_cd_env()</title>
<updated>2022-10-30T18:04:47Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eb5b6b57d0e9fba0e50871ece4ea79e76cd61a36'/>
<id>urn:sha1:eb5b6b57d0e9fba0e50871ece4ea79e76cd61a36</id>
<content type='text'>
run_command_v_opt_cd_env() is only used in an example in a comment.  Use
the struct child_process member "env" and run_command() directly instead
and then remove the unused convenience function.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>run-command: fix return value comment</title>
<updated>2022-10-30T18:04:32Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-10-30T11:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53c4be3fd82208bde63c6f38556089428c4e5be5'/>
<id>urn:sha1:53c4be3fd82208bde63c6f38556089428c4e5be5</id>
<content type='text'>
483bbd4e4c (run-command: introduce child_process_init(), 2014-08-19) and
2d71608ec0 (run-command: factor out child_process_clear(), 2015-10-24)
added help texts about child_process_init() and child_process_clear()
without updating the immediately following documentation of return codes
that only applied to the preexisting functions.

4c4066d95d (run-command: move doc to run-command.h, 2019-11-17) started
to list the functions explicitly that this paragraph applies to, but
still wrongly included child_process_init() and child_process_clear().
Remove their names from that list.

Suggested-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>run-command API: move *_tr2() users to "run_processes_parallel()"</title>
<updated>2022-10-12T21:12:41Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-10-12T21:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36d69bf77e26793277d2708dd9ddad078e7e67a2'/>
<id>urn:sha1:36d69bf77e26793277d2708dd9ddad078e7e67a2</id>
<content type='text'>
Have the users of the "run_processes_parallel_tr2()" function use
"run_processes_parallel()" instead. In preceding commits the latter
was refactored to take a "struct run_process_parallel_opts" argument,
since the only reason for "run_processes_parallel_tr2()" to exist was
to take arguments that are now a part of that struct we can do away
with it.

See ee4512ed481 (trace2: create new combined trace facility,
2019-02-22) for the addition of the "*_tr2()" variant of the function,
it was used by every caller except "t/helper/test-run-command.c"..

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
