<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.c, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-05-19T16:27:06Z</updated>
<entry>
<title>Merge branch 'tb/run-command-needs-alloc-h'</title>
<updated>2023-05-19T16:27:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-05-19T16:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75ab1fa5ab167828da918f19c7aebe5ee7a1b304'/>
<id>urn:sha1:75ab1fa5ab167828da918f19c7aebe5ee7a1b304</id>
<content type='text'>
Fix the build problem with NO_PTHREADS defined, a fallout from
recent header file shuffling.

* tb/run-command-needs-alloc-h:
  run-command.c: fix missing include under `NO_PTHREADS`
</content>
</entry>
<entry>
<title>run-command.c: fix missing include under `NO_PTHREADS`</title>
<updated>2023-05-16T22:17:17Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2023-05-16T21:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=52c0f3318d98dd065ceb68d91bb6720eee20deb3'/>
<id>urn:sha1:52c0f3318d98dd065ceb68d91bb6720eee20deb3</id>
<content type='text'>
Git 2.41-rc0 fails to compile run-command.c with `NO_PTHREADS` defined,
i.e.

  $ make NO_PTHREADS=1 run-command.o

as `ALLOC_GROW()` macro is used in the `atexit()` emulation but the
macro definition is not available.

This bisects to 36bf195890 (alloc.h: move ALLOC_GROW() functions from
cache.h, 2023-02-24), which replaced includes of &lt;cache.h&gt; with
&lt;alloc.h&gt;, which is the new home of `ALLOC_GROW()` (and
`ALLOC_GROW_BY()`).

We can see that run-command.c is the only one that try to use these
macros without including &lt;alloc.h&gt;.

  $ git grep -l -e '[^_]ALLOC_GROW(' -e 'ALLOC_GROW_BY(' \*.c | sort &gt;/tmp/1
  $ git grep -l 'alloc\.h' \*.c | sort &gt;/tmp/2
  $ comm -23 /tmp/[12]
  compat/simple-ipc/ipc-unix-socket.c
  run-command.c

The "compat/" file only talks about the macro in the comment,
and is not broken.

We could fix this by conditionally including "alloc.h" when
`NO_PTHREADS` is defined.  But we have relatively few examples of
conditional includes throughout the tree[^1].

Instead, include "alloc.h" unconditionally in run-command.c to allow it
to successfully compile even when NO_PTHREADS is defined.

[^1]: With `git grep -E -A1 '#if(n)?def' -- **/*.c | grep '#include' -B1`.

Reported-by: Randall S. Becker &lt;randall.becker@nexbridge.ca&gt;
Co-authored-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>symlinks.h: move declarations for symlinks.c functions from cache.h</title>
<updated>2023-04-24T19:47:31Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-22T20:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb2a51356d3019582128a818aea533ccd11f42c0'/>
<id>urn:sha1:cb2a51356d3019582128a818aea533ccd11f42c0</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>treewide: be explicit about dependence on trace.h &amp; trace2.h</title>
<updated>2023-04-11T15:52:08Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-11T03:00:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=74ea5c9574d29a510602492fcd672e5d09c841b0'/>
<id>urn:sha1:74ea5c9574d29a510602492fcd672e5d09c841b0</id>
<content type='text'>
Dozens of files made use of trace and trace2 functions, without
explicitly including trace.h or trace2.h.  This made it more difficult
to find which files could remove a dependence on cache.h.  Make C files
explicitly include trace.h or trace2.h if they are using them.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Acked-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>environment.h: move declarations for environment.c functions from cache.h</title>
<updated>2023-03-21T17:56:53Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-03-21T06:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=32a8f510614312cc8b81bbc6a982d08ab7562ab4'/>
<id>urn:sha1:32a8f510614312cc8b81bbc6a982d08ab7562ab4</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>treewide: be explicit about dependence on gettext.h</title>
<updated>2023-03-21T17:56:51Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-03-21T06:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f394e093df10f1867d9bb2180b3789ee61124aed'/>
<id>urn:sha1:f394e093df10f1867d9bb2180b3789ee61124aed</id>
<content type='text'>
Dozens of files made use of gettext functions, without explicitly
including gettext.h.  This made it more difficult to find which files
could remove a dependence on cache.h.  Make C files explicitly include
gettext.h if they are using it.

However, while compat/fsmonitor/fsm-ipc-darwin.c should also gain an
include of gettext.h, it was left out to avoid conflicting with an
in-flight topic.

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: mark error routine parameters as unused</title>
<updated>2023-02-24T17:13:30Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2023-02-24T06:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce41759ed5edac9d30a73640b4fdd155c9f9fee0'/>
<id>urn:sha1:ce41759ed5edac9d30a73640b4fdd155c9f9fee0</id>
<content type='text'>
After forking but before exec-ing a command, we install special
error/warn/die handlers in the child. These ignore the error messages
they get, since the idea is that they shouldn't be called in the first
place.

Arguably they could pass along that error message _in addition_ to
saying "error() should not be called in a child", but since the whole
point is to avoid any conflicts on stdio/malloc locks, etc, we're better
to just keep these simple. Seeing them trigger is effectively a bug, and
the developer is probably better off grabbing a stack trace.

But we do want to mark the functions so that -Wunused-parameter doesn't
complain.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: allow stdin for run_processes_parallel</title>
<updated>2023-02-08T20:50:03Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2023-02-08T19:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=540267304d37d6257edb3144e770693071d8fbb7'/>
<id>urn:sha1:540267304d37d6257edb3144e770693071d8fbb7</id>
<content type='text'>
While it makes sense not to inherit stdin from the parent process to
avoid deadlocking, it's not necessary to completely ban stdin to
children. An informed user should be able to configure stdin safely. By
setting `some_child.process.no_stdin=1` before calling `get_next_task()`
we provide a reasonable default behavior but enable users to set up
stdin streaming for themselves during the callback.

`some_child.process.stdout_to_stderr`, however, remains unmodifiable by
`get_next_task()` - the rest of the run_processes_parallel() API depends
on child output in stderr.

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: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command.c: remove dead assignment in while-loop</title>
<updated>2023-02-08T20:50:03Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2023-02-08T19:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5123e6e7bd3b0bf3777cb77e36d141f76d8604a4'/>
<id>urn:sha1:5123e6e7bd3b0bf3777cb77e36d141f76d8604a4</id>
<content type='text'>
Remove code that's been unused since it was added in
c553c72eed6 (run-command: add an asynchronous parallel child
processor, 2015-12-15).

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>
<entry>
<title>*: fix typos which duplicate a word</title>
<updated>2023-01-08T01:28:34Z</updated>
<author>
<name>Andrei Rybak</name>
<email>rybak.a.v@gmail.com</email>
</author>
<published>2023-01-07T13:56:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b39a84185e79cff69f9f1f79f1edb014ef27b9c6'/>
<id>urn:sha1:b39a84185e79cff69f9f1f79f1edb014ef27b9c6</id>
<content type='text'>
Fix typos in code comments which repeat various words.  Most of the
cases are simple in that they repeat a word that usually cannot be
repeated in a grammatically correct sentence.  Just remove the
incorrectly duplicated word in these cases and rewrap text, if needed.

A tricky case is usage of "that that", which is sometimes grammatically
correct.  However, an instance of this in "t7527-builtin-fsmonitor.sh"
doesn't need two words "that", because there is only one daemon being
discussed, so replace the second "that" with "the".

Reword code comment "entries exist on on-disk index" in function
update_one in file cache-tree.c, by replacing incorrect preposition "on"
with "in".

Signed-off-by: Andrei Rybak &lt;rybak.a.v@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
