]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/am-i-v-fix'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2016 21:26:01 +0000 (13:26 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2016 21:26:01 +0000 (13:26 -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
index e425070528f4f9fbf0953c9056d1ea43686e176f,cb28207c48b2b9adafc5a874ea9f5afc9a55842c..4bc048148e043eabf1315bbcbae8ea4c6363b330
+++ 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);