| 692 | } |
| 693 | |
| 694 | static void show_diff_of_diff(struct rev_info *opt) |
| 695 | { |
| 696 | if (!cmit_fmt_is_mail(opt->commit_format)) |
| 697 | return; |
| 698 | |
| 699 | if (opt->idiff_oid1) { |
| 700 | struct diff_queue_struct dq; |
| 701 | |
| 702 | memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff)); |
| 703 | diff_queue_init(&diff_queued_diff); |
| 704 | |
| 705 | fprintf_ln(opt->diffopt.file, "\n%s", opt->idiff_title); |
| 706 | show_interdiff(opt->idiff_oid1, opt->idiff_oid2, 2, |
| 707 | &opt->diffopt); |
| 708 | |
| 709 | memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff)); |
| 710 | } |
| 711 | |
| 712 | if (opt->rdiff1) { |
| 713 | struct diff_queue_struct dq; |
| 714 | struct diff_options opts; |
| 715 | struct range_diff_options range_diff_opts = { |
| 716 | .creation_factor = opt->creation_factor, |
| 717 | .dual_color = 1, |
| 718 | .max_memory = RANGE_DIFF_MAX_MEMORY_DEFAULT, |
| 719 | .diffopt = &opts, |
| 720 | .log_arg = &opt->rdiff_log_arg |
| 721 | }; |
| 722 | |
| 723 | memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff)); |
| 724 | diff_queue_init(&diff_queued_diff); |
| 725 | |
| 726 | fprintf_ln(opt->diffopt.file, "\n%s", opt->rdiff_title); |
| 727 | /* |
| 728 | * Pass minimum required diff-options to range-diff; others |
| 729 | * can be added later if deemed desirable. |
| 730 | */ |
| 731 | repo_diff_setup(the_repository, &opts); |
| 732 | opts.file = opt->diffopt.file; |
| 733 | opts.use_color = opt->diffopt.use_color; |
| 734 | diff_setup_done(&opts); |
| 735 | show_range_diff(opt->rdiff1, opt->rdiff2, &range_diff_opts); |
| 736 | |
| 737 | memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff)); |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | void show_log(struct rev_info *opt) |
| 742 | { |
no test coverage detected