Merge lt/revlist,jc/diff,jc/revparse,jc/abbrev
authorJunio C Hamano <junkio@cox.net>
Sat, 28 Jan 2006 08:16:09 +0000 (00:16 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 28 Jan 2006 08:16:09 +0000 (00:16 -0800)
1  2  3  4  5 
diff-tree.c
diff.h
rev-list.c
rev-parse.c

diff --cc diff-tree.c
index efa2b9476eae679b7f98a4605b07b6637e49de5a,efa2b9476eae679b7f98a4605b07b6637e49de5a,99c580cf75ee15d6bbd65c588360309cc94e9dc4,efa2b9476eae679b7f98a4605b07b6637e49de5a,44bc2381c9cd4ab6e10e8bd8b519b564a1b9014b..6593a6920adcdb81fafad94ba2cf96431e6ceec9
@@@@@@ -79,12 -79,12 -82,16 -79,12 -80,12 +83,16 @@@@@@ static const char *generate_header(cons
        offset = sprintf(this_header, "%s%s ",
                         header_prefix,
                         diff_unique_abbrev(commit_sha1, abbrev));
-- --   offset += sprintf(this_header + offset, "(from %s)\n",
-- --                    parent_sha1 ?
-- --                    diff_unique_abbrev(parent_sha1, abbrev) : "root");
-- -    offset += pretty_print_commit(commit_format, msg, len,
++ ++   if (commit_sha1 != parent_sha1)
++ ++           offset += sprintf(this_header + offset, "(from %s)\n",
++ ++                             parent_sha1
++ ++                             ? diff_unique_abbrev(parent_sha1, abbrev)
++ ++                             : "root");
++ ++   else
++ ++           offset += sprintf(this_header + offset, "(from parents)\n");
  -     offset += pretty_print_commit(commit_format, msg, len,
++++    offset += pretty_print_commit(commit_format, commit, len,
                                      this_header + offset,
----                                  sizeof(this_header) - offset);
++++                                  sizeof(this_header) - offset, abbrev);
        return this_header;
     }
     
@@@@@@ -108,8 -108,8 -115,17 -108,8 -109,8 +116,16 @@@@@@ static int diff_tree_commit(const unsig
        }
     
        /* More than one parent? */
-- --   if (ignore_merges && commit->parents && commit->parents->next)
-- --           return 0;
++ ++   if (commit->parents && commit->parents->next) {
++ ++           if (ignore_merges)
++ ++                   return 0;
++ ++           else if (combine_merges) {
  -                     header = generate_header(sha1, sha1,
  -                                              commit->buffer);
+++++                   header = generate_header(sha1, sha1, commit);
++ ++                   return diff_tree_combined_merge(sha1, header,
++ ++                                                   show_empty_combined,
++ ++                                                   dense_combined_merges);
++ ++           }
++ ++   }
     
        for (parents = commit->parents; parents; parents = parents->next) {
                struct commit *parent = parents->item;
diff --cc diff.h
Simple merge
diff --cc rev-list.c
Simple merge
diff --cc rev-parse.c
Simple merge