<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.h, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-04-01T18:05:54Z</updated>
<entry>
<title>fix portability problem with IS_RUN_COMMAND_ERR</title>
<updated>2009-04-01T18:05:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-03-31T12:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd94836923708581ca3f9b5c42a6d600c2f631dc'/>
<id>urn:sha1:fd94836923708581ca3f9b5c42a6d600c2f631dc</id>
<content type='text'>
Some old versions of gcc don't seem to like us negating an
enum constant. Let's work around it by negating the other
half of the comparison instead.

Reported by Pierre Poissinger on gcc 2.9.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-cleanup-after-exec-failure'</title>
<updated>2009-02-03T08:26:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-03T08:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1487eb68f7fd145151caa9a11ee00283629b75ef'/>
<id>urn:sha1:1487eb68f7fd145151caa9a11ee00283629b75ef</id>
<content type='text'>
* jk/maint-cleanup-after-exec-failure:
  git: use run_command() to execute dashed externals
  run_command(): help callers distinguish errors
  run_command(): handle missing command errors more gracefully
  git: s/run_command/run_builtin/
</content>
</entry>
<entry>
<title>run_command(): help callers distinguish errors</title>
<updated>2009-01-28T22:09:35Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-01-28T07:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d64f21d9949ac1dd59fa722160e46181d92854d'/>
<id>urn:sha1:1d64f21d9949ac1dd59fa722160e46181d92854d</id>
<content type='text'>
run_command() returns a single integer specifying either an
error code or the exit status of the spawned program. The
only way to tell the difference is that the error codes are
outside of the allowed range of exit status values.

Rather than make each caller implement the test against a
magic limit, let's provide a macro.

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>Move run_hook() from builtin-commit.c into run-command.c (libgit)</title>
<updated>2009-01-18T01:16:24Z</updated>
<author>
<name>Stephan Beyer</name>
<email>s-beyer@gmx.net</email>
</author>
<published>2009-01-16T19:09:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae98a0089ff7f7641ed15ddd595797de56eb49f1'/>
<id>urn:sha1:ae98a0089ff7f7641ed15ddd595797de56eb49f1</id>
<content type='text'>
A function that runs a hook is used in several Git commands.
builtin-commit.c has the one that is most general for cases without
piping. The one in builtin-gc.c prints some useful warnings.
This patch moves a merged version of these variants into libgit and
lets the other builtins use this libified run_hook().

The run_hook() function used in receive-pack.c feeds the standard
input of the pre-receive or post-receive hooks. This function is
renamed to run_receive_hook() because the libified run_hook() cannot
handle this.

Mentored-by: Daniel Barkalow &lt;barkalow@iabervon.org&gt;
Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Stephan Beyer &lt;s-beyer@gmx.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command.c: remove run_command_v_opt_cd()</title>
<updated>2008-10-03T01:02:44Z</updated>
<author>
<name>Nanako Shiraishi</name>
<email>nanako3@lavabit.com</email>
</author>
<published>2008-10-02T10:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7996ff335e675b229398974f6cbf459843c9bf6d'/>
<id>urn:sha1:7996ff335e675b229398974f6cbf459843c9bf6d</id>
<content type='text'>
This function is not used anywhere.

Johannes Sixt &lt;johannes.sixt@telecom.at&gt;:
&gt; Future callers can use run_command_v_opt_cd_env() instead.

Signed-off-by: Nanako Shiraishi &lt;nanako3@lavabit.com&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>run-command: add pre-exec callback</title>
<updated>2008-07-26T04:29:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2008-07-22T07:12:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ccf08bc3d06050fbe9b76846f6e2ab6d1cd6bd09'/>
<id>urn:sha1:ccf08bc3d06050fbe9b76846f6e2ab6d1cd6bd09</id>
<content type='text'>
This is a function provided by the caller which is called
_after_ the process is forked, but before the spawned
program is executed. On platforms (like mingw) where
subprocesses are forked and executed in a single call, the
preexec callback is simply ignored.

This will be used in the following patch to do some setup
for 'less' that must happen in the forked child.

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>Windows: Implement asynchronous functions as threads.</title>
<updated>2008-06-26T06:45:08Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2007-12-08T21:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=618ebe9ff997d27714487c4a4232720be240badc'/>
<id>urn:sha1:618ebe9ff997d27714487c4a4232720be240badc</id>
<content type='text'>
In upload-pack we must explicitly close the output channel of rev-list.
(On Unix, the channel is closed automatically because process that runs
rev-list terminates.)

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
</content>
</entry>
<entry>
<title>start_command(), if .in/.out &gt; 0, closes file descriptors, not the callers</title>
<updated>2008-02-23T19:59:44Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-02-21T22:42:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c20181e3a3e39f2c8874567c219e9edddb84393a'/>
<id>urn:sha1:c20181e3a3e39f2c8874567c219e9edddb84393a</id>
<content type='text'>
Callers of start_command() can set the members .in and .out of struct
child_process to a value &gt; 0 to specify that this descriptor is used as
the stdin or stdout of the child process.

Previously, if start_command() was successful, this descriptor was closed
upon return. Here we now make sure that the descriptor is also closed in
case of failures. All callers are updated not to close the file descriptor
themselves after start_command() was called.

Note that earlier run_gpg_verify() of git-verify-tag set .out = 1, which
worked because start_command() treated this as a special case, but now
this is incorrect because it closes the descriptor. The intent here is to
inherit stdout to the child, which is achieved by .out = 0.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>start_command(), .in/.out/.err = -1: Callers must close the file descriptor</title>
<updated>2008-02-23T19:59:44Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2008-02-16T17:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e72ae28895b22052b7ca2eef36c039ac62671f7d'/>
<id>urn:sha1:e72ae28895b22052b7ca2eef36c039ac62671f7d</id>
<content type='text'>
By setting .in, .out, or .err members of struct child_process to -1, the
callers of start_command() can request that a pipe is allocated that talks
to the child process and one end is returned by replacing -1 with the
file descriptor.

Previously, a flag was set (for .in and .out, but not .err) to signal
finish_command() to close the pipe end that start_command() had handed out,
so it was optional for callers to close the pipe, and many already do so.
Now we make it mandatory to close the pipe.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: Support sending stderr to /dev/null</title>
<updated>2007-11-12T01:09:55Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-11-11T07:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b73a4397590df9582dd1c994cac30e55e26b0b1e'/>
<id>urn:sha1:b73a4397590df9582dd1c994cac30e55e26b0b1e</id>
<content type='text'>
Some callers may wish to redirect stderr to /dev/null in some
contexts, such as if they are executing a command only to get
the exit status and don't want users to see whatever output it
may produce as a side-effect of computing that exit status.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
</feed>
