summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-26 09:07:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-10-26 09:07:18 (GMT)
commitaf70fa4f48fdb12fef49c8bf2abc507f80081bf3 (patch)
tree4911444b5861d8d71b026b41ffe34301f837693e /combine-diff.c
parente893f7ad73d387afc582d7eb063d57a88be4663d (diff)
parent44152787bcb4fd003d1f5b8c2a7591445cee8f20 (diff)
downloadgit-af70fa4f48fdb12fef49c8bf2abc507f80081bf3.zip
git-af70fa4f48fdb12fef49c8bf2abc507f80081bf3.tar.gz
git-af70fa4f48fdb12fef49c8bf2abc507f80081bf3.tar.bz2
Merge branch 'jc/combined'
* jc/combined: combine-diff: honour --no-commit-id combine-diff: fix hunk_comment_line logic.
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 466156f..29d0c9c 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -491,7 +491,11 @@ static void show_parent_lno(struct sline *sline, unsigned long l0, unsigned long
static int hunk_comment_line(const char *bol)
{
- int ch = *bol & 0xff;
+ int ch;
+
+ if (!bol)
+ return 0;
+ ch = *bol & 0xff;
return (isalpha(ch) || ch == '_' || ch == '$');
}
@@ -737,7 +741,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
int added = 0;
int deleted = 0;
- if (rev->loginfo)
+ if (rev->loginfo && !rev->no_commit_id)
show_log(rev, opt->msg_sep);
dump_quoted_path(dense ? "diff --cc " : "diff --combined ",
elem->path, c_meta, c_reset);
@@ -815,7 +819,7 @@ static void show_raw_diff(struct combine_diff_path *p, int num_parent, struct re
if (!line_termination)
inter_name_termination = 0;
- if (rev->loginfo)
+ if (rev->loginfo && !rev->no_commit_id)
show_log(rev, opt->msg_sep);
if (opt->output_format & DIFF_FORMAT_RAW) {
@@ -887,7 +891,7 @@ void diff_tree_combined(const unsigned char *sha1,
diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
diffopts.recursive = 1;
- show_log_first = !!rev->loginfo;
+ show_log_first = !!rev->loginfo && !rev->no_commit_id;
needsep = 0;
/* find set of paths that everybody touches */
for (i = 0; i < num_parent; i++) {