<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-18T18:25:12Z</updated>
<entry>
<title>commit: fix patch hunk editing with "commit -p -m"</title>
<updated>2014-03-18T18:25:12Z</updated>
<author>
<name>Benoit Pierre</name>
<email>benoit.pierre@gmail.com</email>
</author>
<published>2014-03-18T10:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15048f8a9ace23df67161746ca76b4f46114deee'/>
<id>urn:sha1:15048f8a9ace23df67161746ca76b4f46114deee</id>
<content type='text'>
Don't change git environment: move the GIT_EDITOR=":" override to the
hook command subprocess, like it's already done for GIT_INDEX_FILE.

Signed-off-by: Benoit Pierre &lt;benoit.pierre@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: trivial style fixes</title>
<updated>2013-10-31T20:48:26Z</updated>
<author>
<name>Felipe Contreras</name>
<email>felipe.contreras@gmail.com</email>
</author>
<published>2013-10-31T09:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5a50085c6b4dd7838167c6ce04042b4b563d8916'/>
<id>urn:sha1:5a50085c6b4dd7838167c6ce04042b4b563d8916</id>
<content type='text'>
Signed-off-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tr/fd-gotcha-fixes'</title>
<updated>2013-07-22T18:23:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-07-22T18:23:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d1934caf1c927cb12cd76aa6ced9eab51a3d435'/>
<id>urn:sha1:1d1934caf1c927cb12cd76aa6ced9eab51a3d435</id>
<content type='text'>
Two places we did not check return value (expected to be a file
descriptor) correctly.

* tr/fd-gotcha-fixes:
  run-command: dup_devnull(): guard against syscalls failing
  git_mkstemps: correctly test return value of open()
</content>
</entry>
<entry>
<title>run-command: dup_devnull(): guard against syscalls failing</title>
<updated>2013-07-12T17:30:09Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@inf.ethz.ch</email>
</author>
<published>2013-07-12T08:58:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a77f106c7837faf6a712ea3ac720f5c4fa2feb07'/>
<id>urn:sha1:a77f106c7837faf6a712ea3ac720f5c4fa2feb07</id>
<content type='text'>
dup_devnull() did not check the return values of open() and dup2().
Fix this omission.

Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: rename WIN32 cpp macro to GIT_WINDOWS_NATIVE</title>
<updated>2013-05-08T19:14:35Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2013-05-02T19:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=380395d094b49834c3ec804407853fd6e81de702'/>
<id>urn:sha1:380395d094b49834c3ec804407853fd6e81de702</id>
<content type='text'>
Throughout git, it is assumed that the WIN32 preprocessor symbol is
defined on native Windows setups (mingw and msvc) and not on Cygwin.
On Cygwin, most of the time git can pretend this is just another Unix
machine, and Windows-specific magic is generally counterproductive.

Unfortunately Cygwin *does* define the WIN32 symbol in some headers.
Best to rely on a new git-specific symbol GIT_WINDOWS_NATIVE instead,
defined as follows:

	#if defined(WIN32) &amp;&amp; !defined(__CYGWIN__)
	# define GIT_WINDOWS_NATIVE
	#endif

After this change, it should be possible to drop the
CYGWIN_V15_WIN32API setting without any negative effect.

[rj: %s/WINDOWS_NATIVE/GIT_WINDOWS_NATIVE/g ]

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/a-thread-only-dies-once'</title>
<updated>2013-04-19T20:45:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-19T20:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9526aa461f6c6900cb892a6fe248150ad436c0d5'/>
<id>urn:sha1:9526aa461f6c6900cb892a6fe248150ad436c0d5</id>
<content type='text'>
A regression fix for the logic to detect die() handler triggering
itself recursively.

* jk/a-thread-only-dies-once:
  run-command: use thread-aware die_is_recursing routine
  usage: allow pluggable die-recursion checks
</content>
</entry>
<entry>
<title>run-command: use thread-aware die_is_recursing routine</title>
<updated>2013-04-16T22:02:48Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-04-16T19:50:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1ece66bc9e5433dff008786daba9918f3e2a6525'/>
<id>urn:sha1:1ece66bc9e5433dff008786daba9918f3e2a6525</id>
<content type='text'>
If we die from an async thread, we do not actually exit the
program, but just kill the thread. This confuses the static
counter in usage.c's default die_is_recursing function; it
updates the counter once for the thread death, and then when
the main program calls die() itself, it erroneously thinks
we are recursing. The end result is that we print "recursion
detected in die handler" instead of the real error in such a
case (the easiest way to trigger this is having a remote
connection hang up while running a sideband demultiplexer).

This patch solves it by using a per-thread counter when the
async_die function is installed; we detect recursion in each
thread (including the main one), but they do not step on
each other's toes.

Other threaded code does not need to worry about this, as
they do not install specialized die handlers; they just let
a die() from a sub-thread take down the whole program.

Since we are overriding the default recursion-check
function, there is an interesting corner case that is not a
problem, but bears some explanation. Imagine the main thread
calls die(), and then in the die_routine starts an async
call. We will switch to using thread-local storage, which
starts at 0, for the main thread's counter, even though
the original counter was actually at 1. That's OK, though,
for two reasons:

  1. It would miss only the first level of recursion, and
     would still find recursive failures inside the async
     helper.

  2. We do not currently and are not likely to start doing
     anything as heavyweight as starting an async routine
     from within a die routine or helper function.

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: always set failed_errno in start_command</title>
<updated>2013-03-21T21:06:48Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-03-21T15:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25043d8aea7859497c12cb035e6688f76e32ac13'/>
<id>urn:sha1:25043d8aea7859497c12cb035e6688f76e32ac13</id>
<content type='text'>
When we fail to fork, we set the failed_errno variable to
the value of errno so it is not clobbered by later syscalls.
However, we do so in a conditional, and it is hard to see
later under what conditions the variable has a valid value.

Instead of setting it only when fork fails, let's just
always set it after forking. This is more obvious for human
readers (as we are no longer setting it as a side effect of
a strerror call), and it is more obvious to gcc, which no
longer generates a spurious -Wuninitialized warning. It also
happens to match what the WIN32 half of the #ifdef does.

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>Merge branch 'sb/run-command-fd-error-reporting'</title>
<updated>2013-02-07T22:41:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-02-07T22:41:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5b56ea40c432f7687398bb012038ae12ac05ad4'/>
<id>urn:sha1:b5b56ea40c432f7687398bb012038ae12ac05ad4</id>
<content type='text'>
* sb/run-command-fd-error-reporting:
  run-command: be more informative about what failed
</content>
</entry>
<entry>
<title>run-command: be more informative about what failed</title>
<updated>2013-02-01T22:11:50Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2013-01-31T02:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=939296c4a42b0eb22542f0fe2e50b53993489eff'/>
<id>urn:sha1:939296c4a42b0eb22542f0fe2e50b53993489eff</id>
<content type='text'>
While debugging an error with verify_signed_buffer() the error
messages from run-command weren't very useful:

 error: cannot create pipe for gpg: Too many open files
 error: could not run gpg.

because they didn't indicate *which* pipe couldn't be created.

Print which pipe failed to be created in the error message so we
can more easily debug similar problems in the future.

For example, the above error now prints:

 error: cannot create standard error pipe for gpg: Too many open files
 error: could not run gpg.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
