Merge branch 'mk/show-s-no-extra-blank-line-for-merges'
authorJunio C Hamano <gitster@pobox.com>
Fri, 6 Jun 2014 18:35:01 +0000 (11:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Jun 2014 18:35:02 +0000 (11:35 -0700)
* mk/show-s-no-extra-blank-line-for-merges:
git-show: fix 'git show -s' to not add extra terminator after merge commit

1  2 
combine-diff.c
diff --cc combine-diff.c
index 12764fb733f3ca57f12c7fc567eec02d234c889e,ff6ceafe61736cc864fa133b8f5b53732511993f..f9975d2c2ebc83e8ecfc953c8df907fbff7858f5
@@@ -1383,23 -1302,8 +1383,24 @@@ void diff_tree_combined(const unsigned 
  {
        struct diff_options *opt = &rev->diffopt;
        struct diff_options diffopts;
 -      struct combine_diff_path *p, *paths = NULL;
 +      struct combine_diff_path *p, *paths;
        int i, num_paths, needsep, show_log_first, num_parent = parents->nr;
-               if (rev->verbose_header && opt->output_format)
 +      int need_generic_pathscan;
 +
 +      /* nothing to do, if no parents */
 +      if (!num_parent)
 +              return;
 +
 +      show_log_first = !!rev->loginfo && !rev->no_commit_id;
 +      needsep = 0;
 +      if (show_log_first) {
 +              show_log(rev);
 +
++              if (rev->verbose_header && opt->output_format &&
++                  opt->output_format != DIFF_FORMAT_NO_OUTPUT)
 +                      printf("%s%c", diff_line_prefix(opt),
 +                             opt->line_termination);
 +      }
  
        diffopts = *opt;
        copy_pathspec(&diffopts.pathspec, &opt->pathspec);