summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-14 02:19:34 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-14 02:19:34 (GMT)
commit89b0c4b5a3a9d026d9adb30d4e896965e480725e (patch)
treeb95fd9982480f7ad68b1fb11dac851c86ec858c3 /combine-diff.c
parent182a8dabd5f5f646608f3857f10f3ac18c3d1445 (diff)
downloadgit-89b0c4b5a3a9d026d9adb30d4e896965e480725e.zip
git-89b0c4b5a3a9d026d9adb30d4e896965e480725e.tar.gz
git-89b0c4b5a3a9d026d9adb30d4e896965e480725e.tar.bz2
Fix type of combine-diff.c::show_patch_diff()
The other function, show_raw_diff() is void and no callers use return value from neither. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/combine-diff.c b/combine-diff.c
index ba8baca..f2f3806 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -609,15 +609,15 @@ static void dump_quoted_path(const char *prefix, const char *path,
printf("%s\n", c_reset);
}
-static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
- int dense, struct rev_info *rev)
+static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
+ int dense, struct rev_info *rev)
{
struct diff_options *opt = &rev->diffopt;
unsigned long result_size, cnt, lno;
char *result, *cp;
struct sline *sline; /* survived lines */
int mode_differs = 0;
- int i, show_hunks, shown_header = 0;
+ int i, show_hunks;
int working_tree_file = !memcmp(elem->sha1, null_sha1, 20);
int abbrev = opt->full_index ? 40 : DEFAULT_ABBREV;
mmfile_t result_file;
@@ -769,7 +769,6 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
}
free(sline[0].p_lno);
free(sline);
- return shown_header;
}
#define COLONS "::::::::::::::::::::::::::::::::"
@@ -837,11 +836,10 @@ void show_combined_diff(struct combine_diff_path *p,
return;
if (opt->output_format & (DIFF_FORMAT_RAW |
DIFF_FORMAT_NAME |
- DIFF_FORMAT_NAME_STATUS)) {
+ DIFF_FORMAT_NAME_STATUS))
show_raw_diff(p, num_parent, rev);
- } else if (opt->output_format & DIFF_FORMAT_PATCH) {
+ else if (opt->output_format & DIFF_FORMAT_PATCH)
show_patch_diff(p, num_parent, dense, rev);
- }
}
void diff_tree_combined(const unsigned char *sha1,