Merge branch 'sp/maint-push-sideband' into sp/push-sideband
authorJunio C Hamano <gitster@pobox.com>
Sat, 6 Feb 2010 05:08:53 +0000 (21:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Feb 2010 05:08:53 +0000 (21:08 -0800)
* sp/maint-push-sideband:
receive-pack: Send hook output over side band #2
receive-pack: Wrap status reports inside side-band-64k
receive-pack: Refactor how capabilities are shown to the client
send-pack: demultiplex a sideband stream with status data
run-command: support custom fd-set in async
run-command: Allow stderr to be a caller supplied pipe
Update git fsck --full short description to mention packs

Conflicts:
run-command.c

1  2 
builtin-receive-pack.c
builtin-send-pack.c
convert.c
remote-curl.c
run-command.c
run-command.h
t/t5401-update-hooks.sh
Simple merge
Simple merge
diff --cc convert.c
index 27acce58bc4bec60a394f03db1f6e60e1e4cfc3e,e70ee094a76d850cd655338d406a7c4efc37c7d5..4f8fcb7bbb00b66f1eaa354119784e6ef57e1eb4
+++ b/convert.c
@@@ -253,9 -253,8 +253,9 @@@ static int filter_buffer(int in, int ou
  
        memset(&child_process, 0, sizeof(child_process));
        child_process.argv = argv;
 +      child_process.use_shell = 1;
        child_process.in = -1;
-       child_process.out = fd;
+       child_process.out = out;
  
        if (start_command(&child_process))
                return error("cannot fork to run external filter %s", params->cmd);
diff --cc remote-curl.c
Simple merge
diff --cc run-command.c
index 2feb493951322617692085998ac8507cdba9dd30,0d95340833aa999ecee58ad70c1c61a832fcdf38..0cd7f02ffe597d3708873d4f3d6b4c0e88e8fae7
@@@ -314,26 -142,41 +317,28 @@@ fail_pipe
        const char **sargv = cmd->argv;
        char **env = environ;
  
 -      if (cmd->no_stdin) {
 -              s0 = dup(0);
 -              dup_devnull(0);
 -      } else if (need_in) {
 -              s0 = dup(0);
 -              dup2(fdin[0], 0);
 -      } else if (cmd->in) {
 -              s0 = dup(0);
 -              dup2(cmd->in, 0);
 -      }
 -
 -      if (cmd->no_stderr) {
 -              s2 = dup(2);
 -              dup_devnull(2);
 -      } else if (need_err) {
 -              s2 = dup(2);
 -              dup2(fderr[1], 2);
 -      } else if (cmd->err > 2) {
 -              s2 = dup(2);
 -              dup2(cmd->err, 2);
 -      }
 -
 -      if (cmd->no_stdout) {
 -              s1 = dup(1);
 -              dup_devnull(1);
 -      } else if (cmd->stdout_to_stderr) {
 -              s1 = dup(1);
 -              dup2(2, 1);
 -      } else if (need_out) {
 -              s1 = dup(1);
 -              dup2(fdout[1], 1);
 -      } else if (cmd->out > 1) {
 -              s1 = dup(1);
 -              dup2(cmd->out, 1);
 -      }
 +      if (cmd->no_stdin)
 +              fhin = open("/dev/null", O_RDWR);
 +      else if (need_in)
 +              fhin = dup(fdin[0]);
 +      else if (cmd->in)
 +              fhin = dup(cmd->in);
 +
 +      if (cmd->no_stderr)
 +              fherr = open("/dev/null", O_RDWR);
 +      else if (need_err)
 +              fherr = dup(fderr[1]);
++      else if (cmd->err > 2)
++              fherr = dup(cmd->err);
 +
 +      if (cmd->no_stdout)
 +              fhout = open("/dev/null", O_RDWR);
 +      else if (cmd->stdout_to_stderr)
 +              fhout = dup(fherr);
 +      else if (need_out)
 +              fhout = dup(fdout[1]);
 +      else if (cmd->out > 1)
 +              fhout = dup(cmd->out);
  
        if (cmd->dir)
                die("chdir in start_command() not implemented");
diff --cc run-command.h
Simple merge
Simple merge