diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-02-10 18:47:41 -0800 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-02-10 18:47:41 -0800 |
| commit | 3f6726e1f112d221bd2a919e9b1b2927aeef6150 (patch) | |
| tree | 9ee388cce7c0ce7f5db55f5de0379b48212e7229 /diff-tree.c | |
| parent | 9ae6be80163669db921e6522140900da41753ed5 (diff) | |
| parent | d416df8869d803282fb254a18505eccceee9ba3e (diff) | |
| download | git-3f6726e1f112d221bd2a919e9b1b2927aeef6150.tar.xz | |
Merge branch 'lt/diff-tree'
* lt/diff-tree:
combine-diff: Record diff status a bit more faithfully
find_unique_abbrev() simplification.
combine-diff: move formatting logic to show_combined_diff()
combined-diff: use diffcore before intersecting paths.
diff-tree -c raw output
Diffstat (limited to 'diff-tree.c')
| -rw-r--r-- | diff-tree.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/diff-tree.c b/diff-tree.c index 7148323348..b170b03fd3 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -6,7 +6,7 @@ static int show_root_diff = 0; static int no_commit_id = 0; static int verbose_header = 0; static int ignore_merges = 1; -static int combine_merges = 0; +static int combine_merges = 1; static int dense_combined_merges = 0; static int read_stdin = 0; static int always_show_header = 0; @@ -117,8 +117,12 @@ static int diff_tree_commit(struct commit *commit) return 0; else if (combine_merges) { header = generate_header(sha1, sha1, commit); - return diff_tree_combined_merge(sha1, header, - dense_combined_merges); + header = diff_tree_combined_merge(sha1, header, + dense_combined_merges, + &diff_options); + if (!header && verbose_header) + header_prefix = "\ndiff-tree "; + return 0; } } @@ -244,7 +248,7 @@ int main(int argc, const char **argv) continue; } if (!strcmp(arg, "-m")) { - ignore_merges = 0; + combine_merges = ignore_merges = 0; continue; } if (!strcmp(arg, "-c")) { @@ -285,10 +289,12 @@ int main(int argc, const char **argv) usage(diff_tree_usage); } - if (combine_merges) { - diff_options.output_format = DIFF_FORMAT_PATCH; + if (combine_merges) ignore_merges = 0; - } + + /* We can only do dense combined merges with diff output */ + if (dense_combined_merges) + diff_options.output_format = DIFF_FORMAT_PATCH; if (diff_options.output_format == DIFF_FORMAT_PATCH) diff_options.recursive = 1; |
