Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Aug 20, 2014
  1. @gitster

    run-command: introduce CHILD_PROCESS_INIT

    René Scharfe authored gitster committed
    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 <>
    Signed-off-by: Rene Scharfe <>
    Signed-off-by: Junio C Hamano <>
Commits on Apr 20, 2011
  1. @jrn @gitster

    tests: check error message from run_command

    jrn authored gitster committed
    In git versions starting at v1.7.5-rc0~29^2 until v1.7.5-rc3~2 (Revert
    "run-command: prettify -D_FORTIFY_SOURCE workaround", 2011-04-18)
    fixed it, the run_command facility would write a truncated error
    message when the command is present but cannot be executed for some
    other reason.  For example, if I add a 'hello' command to git:
    	$ echo 'echo hello' >git-hello
    	$ chmod +x git-hello
    	$ PATH=.:$PATH git hello
    and make it non-executable, this is what I normally get:
    	$ chmod -x git-hello
    	$ git hello
    	fatal: cannot exec 'git-hello': Permission denied
    But with the problematic versions, we get disturbing output:
    	$ PATH=.:$PATH git hello
    	fatal: $
    Add some tests to make sure it doesn't happen again.
    The hello-script used in these tests uses cat instead of echo because
    on Windows the bash spawned by git converts LF to CRLF in text written
    by echo while the bash running tests does not, causing the test to
    fail if "echo" is used.  Thanks to Hannes for noticing.
    Signed-off-by: Jonathan Nieder <>
    Improved-by: Johannes Sixt <>
    Signed-off-by: Junio C Hamano <>
Commits on Jan 10, 2010
  1. @gitster

    start_command: detect execvp failures early

    Johannes Sixt authored gitster committed
    Previously, failures during execvp could be detected only by
    finish_command. However, in some situations it is beneficial for the
    parent process to know earlier that the child process will not run.
    The idea to use a pipe to signal failures to the parent process and
    the test case were lifted from patches by Ilari Liusvaara.
    Signed-off-by: Johannes Sixt <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.