From: Junio C Hamano Date: Tue, 18 Apr 2006 06:15:41 +0000 (-0700) Subject: Merge branch 'lt/logopt' into next X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=80608a61f0f855deec369fbce59facf859050a34;p=git.git Merge branch 'lt/logopt' into next * lt/logopt: combine-diff: show diffstat with the first parent. git.c: LOGSIZE is unused after log printing cleanup. Log message printout cleanups (#3): fix --pretty=oneline Log message printout cleanups (#2) Log message printout cleanups rev-list --header: output format fix --- 80608a61f0f855deec369fbce59facf859050a34 diff --cc combine-diff.c index 9445e86c,27f6f57f..ca36f5d5 --- a/combine-diff.c +++ b/combine-diff.c @@@ -584,12 -585,22 +585,22 @@@ static void reuse_combine_diff(struct s sline->p_lno[i] = sline->p_lno[j]; } + static void dump_quoted_path(const char *prefix, const char *path) + { + fputs(prefix, stdout); + if (quote_c_style(path, NULL, NULL, 0)) + quote_c_style(path, NULL, stdout, 0); + else + printf("%s", path); + putchar('\n'); + } + static int show_patch_diff(struct combine_diff_path *elem, int num_parent, - int dense, const char *header, - struct diff_options *opt) + int dense, struct rev_info *rev) { + struct diff_options *opt = &rev->diffopt; unsigned long result_size, cnt, lno; - char *result, *cp, *ep; + char *result, *cp; struct sline *sline; /* survived lines */ int mode_differs = 0; int i, show_hunks, shown_header = 0; @@@ -749,9 -756,10 +755,10 @@@ #define COLONS "::::::::::::::::::::::::::::::::" - static void show_raw_diff(struct combine_diff_path *p, int num_parent, const char *header, struct diff_options *opt) + static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct rev_info *rev) { + struct diff_options *opt = &rev->diffopt; - int i, offset, mod_type = 'A'; + int i, offset; const char *prefix; int line_termination, inter_name_termination; @@@ -760,9 -768,16 +767,9 @@@ if (!line_termination) inter_name_termination = 0; - if (header) - printf("%s%c", header, line_termination); + if (rev->loginfo) + show_log(rev, rev->loginfo, "\n"); - for (i = 0; i < num_parent; i++) { - if (p->parent[i].mode) - mod_type = 'M'; - } - if (!p->mode) - mod_type = 'D'; - if (opt->output_format == DIFF_FORMAT_RAW) { offset = strlen(COLONS) - num_parent; if (offset < 0) diff --cc revision.h index 872bcd81,05f658a2..48d7b4ca --- a/revision.h +++ b/revision.h @@@ -7,10 -7,10 +7,11 @@@ #define SHOWN (1u<<3) #define TMP_MARK (1u<<4) /* for isolated cases; clean after use */ #define BOUNDARY (1u<<5) -#define ADDED (1u<<6) /* Parents already parsed and added? */ +#define BOUNDARY_SHOW (1u<<6) +#define ADDED (1u<<7) /* Parents already parsed and added? */ struct rev_info; + struct log_info; typedef void (prune_fn_t)(struct rev_info *revs, struct commit *commit);