OSDN Git Service

Merge branch 'jc/am-i-v-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 10 Mar 2016 19:13:40 +0000 (11:13 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 10 Mar 2016 19:13:41 +0000 (11:13 -0800)
The "v(iew)" subcommand of the interactive "git am -i" command was
broken in 2.6.0 timeframe when the command was rewritten in C.

* jc/am-i-v-fix:
  am -i: fix "v"iew
  pager: factor out a helper to prepare a child process to run the pager
  pager: lose a separate argv[]

1  2 
builtin/am.c
cache.h
pager.c

diff --cc builtin/am.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc pager.c
+++ b/pager.c
   * something different on Windows.
   */
  
- static const char *pager_argv[] = { NULL, NULL };
  static struct child_process pager_process = CHILD_PROCESS_INIT;
  
 -static void wait_for_pager(void)
 +static void wait_for_pager(int in_signal)
  {
 -      fflush(stdout);
 -      fflush(stderr);
 +      if (!in_signal) {
 +              fflush(stdout);
 +              fflush(stderr);
 +      }
        /* signal EOF to pager */
        close(1);
        close(2);