<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/run-command.c, branch v2.2.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-11-10T22:43:19Z</updated>
<entry>
<title>run-command: use void to declare that functions take no parameters</title>
<updated>2014-11-10T22:43:19Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-11-10T21:17:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6066a7eac4b2bcdb86971783b583e4e408b32e81'/>
<id>urn:sha1:6066a7eac4b2bcdb86971783b583e4e408b32e81</id>
<content type='text'>
Explicitly declare that git_atexit_dispatch() and git_atexit_clear()
take no parameters instead of leaving their parameter list empty and
thus unspecified.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'eb/no-pthreads'</title>
<updated>2014-10-24T21:59:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-10-24T21:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4da4fbe0eea55c26f042f76df58bfc529b46ae0'/>
<id>urn:sha1:e4da4fbe0eea55c26f042f76df58bfc529b46ae0</id>
<content type='text'>
Allow us build with NO_PTHREADS=NoThanks compilation option.

* eb/no-pthreads:
  Handle atexit list internaly for unthreaded builds
  pack-objects: set number of threads before checking and warning
  index-pack: fix compilation with NO_PTHREADS
</content>
</entry>
<entry>
<title>Handle atexit list internaly for unthreaded builds</title>
<updated>2014-10-19T22:38:30Z</updated>
<author>
<name>Etienne Buira</name>
<email>etienne.buira@gmail.com</email>
</author>
<published>2014-10-18T12:31:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f4b6db3baeff8de53769b38f439408abd5a42f7'/>
<id>urn:sha1:0f4b6db3baeff8de53769b38f439408abd5a42f7</id>
<content type='text'>
Wrap atexit()s calls on unthreaded builds to handle callback list
internally.

This is needed because on unthreaded builds, asyncs inherits parent's
atexit() list, that gets run as soon as the async exit()s (and again at
the end of async's parent process). That led to remove temporary files
too early.

Also remove a by-atexit-callback guard against this kind of issue in
clone.c, as this patch makes it redundant.

Fixes test 5537 (temporary shallow file vanished before unpack-objects
could open it)

BTW remove an unused variable in shallow.c.

Helped-by: Duy Nguyen &lt;pclouds@gmail.com&gt;
Helped-by: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Etienne Buira &lt;etienne.buira@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: add env_array, an optional argv_array for env</title>
<updated>2014-10-19T22:26:31Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-10-19T11:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=19a583dc39e3e1110f746e837c5ce1953d6ebfa1'/>
<id>urn:sha1:19a583dc39e3e1110f746e837c5ce1953d6ebfa1</id>
<content type='text'>
Similar to args, add a struct argv_array member to struct child_process
that simplifies specifying the environment for children.  It is freed
automatically by finish_command() or if start_command() encounters an
error.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: inline prepare_run_command_v_opt()</title>
<updated>2014-08-20T16:56:12Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-08-19T19:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f87293d78a4b2bd9265bac49b14a6f1111918b8'/>
<id>urn:sha1:1f87293d78a4b2bd9265bac49b14a6f1111918b8</id>
<content type='text'>
Merge prepare_run_command_v_opt() and its only caller.  This removes a
pointer indirection and allows to initialize the struct child_process
using CHILD_PROCESS_INIT.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: call run_command_v_opt_cd_env() instead of duplicating it</title>
<updated>2014-08-20T16:55:41Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-08-19T19:11:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41e9bad75e05245859c013dadefc63166b9175c9'/>
<id>urn:sha1:41e9bad75e05245859c013dadefc63166b9175c9</id>
<content type='text'>
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: introduce child_process_init()</title>
<updated>2014-08-20T16:54:58Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-08-19T19:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=483bbd4e4ce8a5c717cd47d732893317a14c965a'/>
<id>urn:sha1:483bbd4e4ce8a5c717cd47d732893317a14c965a</id>
<content type='text'>
Add a helper function for initializing those struct child_process
variables for which the macro CHILD_PROCESS_INIT can't be used.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: introduce CHILD_PROCESS_INIT</title>
<updated>2014-08-20T16:53:37Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-08-19T19:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3180279322c7450a47decf8833de47f444ca93f'/>
<id>urn:sha1:d3180279322c7450a47decf8833de47f444ca93f</id>
<content type='text'>
Most struct child_process variables are cleared using memset first after
declaration.  Provide a macro, CHILD_PROCESS_INIT, that can be used to
initialize them statically instead.  That's shorter, doesn't require a
function call and is slightly more readable (especially given that we
already have STRBUF_INIT, ARGV_ARRAY_INIT etc.).

Helped-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sk/mingw-uni-fix-more'</title>
<updated>2014-07-30T21:21:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-30T21:21:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=385e171a5b56dabbe33dbef6f88e8f934a6cacda'/>
<id>urn:sha1:385e171a5b56dabbe33dbef6f88e8f934a6cacda</id>
<content type='text'>
Most of these are battle-tested in msysgit and are needed to
complete what has been merged to 'master' already.

* sk/mingw-uni-fix-more:
  Win32: enable color output in Windows cmd.exe
  Win32: patch Windows environment on startup
  Win32: keep the environment sorted
  Win32: use low-level memory allocation during initialization
  Win32: reduce environment array reallocations
  Win32: don't copy the environment twice when spawning child processes
  Win32: factor out environment block creation
  Win32: unify environment function names
  Win32: unify environment case-sensitivity
  Win32: fix environment memory leaks
  Win32: Unicode environment (incoming)
  Win32: Unicode environment (outgoing)
  Revert "Windows: teach getenv to do a case-sensitive search"
  tests: do not pass iso8859-1 encoded parameter
</content>
</entry>
<entry>
<title>Win32: don't copy the environment twice when spawning child processes</title>
<updated>2014-07-21T16:32:49Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2014-07-17T15:38:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77734da241f97607eea8f2bb55e0e19937e918d4'/>
<id>urn:sha1:77734da241f97607eea8f2bb55e0e19937e918d4</id>
<content type='text'>
When spawning child processes via start_command(), the environment and all
environment entries are copied twice. First by make_augmented_environ /
copy_environ to merge with child_process.env. Then a second time by
make_environment_block to create a sorted environment block string as
required by CreateProcess.

Move the merge logic to make_environment_block so that we only need to copy
the environment once. This changes semantics of the env parameter: it now
expects a delta (such as child_process.env) rather than a full environment.
This is not a problem as the parameter is only used by start_command()
(all other callers previously passed char **environ, and now pass NULL).

The merge logic no longer xstrdup()s the environment strings, so do_putenv
must not free them. Add a parameter to distinguish this from normal putenv.

Remove the now unused make_augmented_environ / free_environ API.

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
