<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/run-command.h, branch v1.5.4.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.4.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.4.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2007-11-12T01:09:55Z</updated>
<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.stealer.net/cgit.cgi/user/sven/git.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>
<entry>
<title>Add infrastructure to run a function asynchronously.</title>
<updated>2007-10-21T05:30:41Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2007-10-19T19:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2d22c208304156892fd6674e0055a3212c1e2d2e'/>
<id>urn:sha1:2d22c208304156892fd6674e0055a3212c1e2d2e</id>
<content type='text'>
This adds start_async() and finish_async(), which runs a function
asynchronously. Communication with the caller happens only via pipes.
For this reason, this implementation forks off a child process that runs
the function.

[sp: Style nit fixed by removing unnecessary block on if condition
     inside of start_async()]

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Have start_command() create a pipe to read the stderr of the child.</title>
<updated>2007-10-21T05:30:40Z</updated>
<author>
<name>Johannes Sixt</name>
<email>johannes.sixt@telecom.at</email>
</author>
<published>2007-10-19T19:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f3b33f1d220056243d3c1da154d3859410630189'/>
<id>urn:sha1:f3b33f1d220056243d3c1da154d3859410630189</id>
<content type='text'>
This adds another stanza that allocates a pipe that is connected to the
child's stderr and that the caller can read from. In order to request this
pipe, the caller sets cmd-&gt;err to -1.

The implementation is not exactly modeled after the stdout case: For stdout
the caller can supply an existing file descriptor, but this facility is
nowhere needed in the stderr case. Additionally, the caller is required to
close cmd-&gt;err.

Signed-off-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>Allow environment variables to be unset in the processes started by run_command</title>
<updated>2007-05-24T05:38:44Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2007-05-23T20:21:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3427b375b594b93ed47ae80ca1d6bb361d7d8f5e'/>
<id>urn:sha1:3427b375b594b93ed47ae80ca1d6bb361d7d8f5e</id>
<content type='text'>
To unset a variable, just specify its name, without "=". For example:

    const char *env[] = {"GIT_DIR=.git", "PWD", NULL};
    const char *argv[] = {"git-ls-files", "-s", NULL};
    int err = run_command_v_opt_cd_env(argv, RUN_GIT_CMD, ".", env);

The PWD will be unset before executing git-ls-files.

Signed-off-by: Alex Riesen &lt;raa.lkml@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Add ability to specify environment extension to run_command</title>
<updated>2007-05-24T05:38:44Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2007-05-22T21:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ee4931486b752b0a3ee04be31f25aed13913cb31'/>
<id>urn:sha1:ee4931486b752b0a3ee04be31f25aed13913cb31</id>
<content type='text'>
There is no way to specify and override for the environment:
there'd be no user for it yet.

Signed-off-by: Alex Riesen &lt;raa.lkml@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Add run_command_v_opt_cd: chdir into a directory before exec</title>
<updated>2007-05-24T05:38:44Z</updated>
<author>
<name>Alex Riesen</name>
<email>raa.lkml@gmail.com</email>
</author>
<published>2007-05-22T21:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1568fea01eb25a293f8dae570a31ca34d41b5442'/>
<id>urn:sha1:1568fea01eb25a293f8dae570a31ca34d41b5442</id>
<content type='text'>
It can make code simplier (no need to preserve cwd) and safer
(no chance the cwd of the current process is accidentally forgotten).

Signed-off-by: Alex Riesen &lt;raa.lkml@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Teach run-command to redirect stdout to /dev/null</title>
<updated>2007-03-13T06:40:17Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-03-12T18:37:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e4507ae84ed04c835b66f77195a0549b72f99c39'/>
<id>urn:sha1:e4507ae84ed04c835b66f77195a0549b72f99c39</id>
<content type='text'>
Some run-command callers may wish to just discard any data that
is sent to stdout from the child.  This is a lot like our existing
no_stdin support, we just open /dev/null and duplicate the descriptor
into position.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Teach run-command about stdout redirection</title>
<updated>2007-03-13T06:40:17Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-03-12T18:37:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f4bba25bdc0ecb4ac338de81a2a65af487701833'/>
<id>urn:sha1:f4bba25bdc0ecb4ac338de81a2a65af487701833</id>
<content type='text'>
Some potential callers of the run_command family of functions need
to control not only the stdin redirection of the child, but also
the stdout redirection of the child.  This can now be setup much
like the already existing stdin redirection.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Teach run_command how to setup a stdin pipe</title>
<updated>2007-03-12T05:49:40Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-03-10T08:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4919bf0354e2a1cfb948c320d45d51319ada30eb'/>
<id>urn:sha1:4919bf0354e2a1cfb948c320d45d51319ada30eb</id>
<content type='text'>
Sometimes callers trying to use run_command to execute a child
process will want to setup a pipe or file descriptor to redirect
into the child's stdin.

This idea is completely stolen from builtin-bundle's fork_with_pipe,
written by Johannes Schindelin.  All credit (and blame) should lie
with Dscho.  ;-)

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Split run_command into two halves (start/finish)</title>
<updated>2007-03-12T05:49:37Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2007-03-10T08:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ebcb5d16ca911d5e21bb8071c185fb47a0c1fbb3'/>
<id>urn:sha1:ebcb5d16ca911d5e21bb8071c185fb47a0c1fbb3</id>
<content type='text'>
If the calling process wants to send data to stdin of a
child process it will need to arrange for a pipe and get
the child process running, feed data to it, then wait
for the child process to finish.  So we split the run
function into two halves, allowing callers to first
start the child then later finish it.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
