summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 717d146)
raw | patch | inline | side by side (parent: 717d146)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 28 Jan 2007 09:42:31 +0000 (01:42 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 28 Jan 2007 10:04:48 +0000 (02:04 -0800) |
Otherwise a pathname that has funny characters such as LF would
screw up the parsing programs of the output.
Strictly speaking, this is not backward compatible, but the
current output for pathnames that have embedded LF and such
cannot be sanely parsed anyway, and pathnames that only use
characters from the portable pathname character set won't be
affected.
Signed-off-by: Junio C Hamano <junkio@cox.net>
screw up the parsing programs of the output.
Strictly speaking, this is not backward compatible, but the
current output for pathnames that have embedded LF and such
cannot be sanely parsed anyway, and pathnames that only use
characters from the portable pathname character set won't be
affected.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-blame.c | patch | blob | history |
diff --git a/builtin-blame.c b/builtin-blame.c
index 54ab675624166826b71013952bb1efd293d5d0d0..7a58ee303f43668aa513181d91c9f1e412b0ffdf 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
summary_buf[len] = 0;
}
+static void write_filename_info(const char *path)
+{
+ printf("filename ");
+ write_name_quoted(NULL, 0, path, 1, stdout);
+ putchar('\n');
+}
+
static void found_guilty_entry(struct blame_entry *ent)
{
if (ent->guilty)
if (suspect->commit->object.flags & UNINTERESTING)
printf("boundary\n");
}
- printf("filename ");
- write_name_quoted(NULL, 0, suspect->path, 1, stdout);
- putchar('\n');
+ write_filename_info(suspect->path);
}
}
printf("committer-mail %s\n", ci.committer_mail);
printf("committer-time %lu\n", ci.committer_time);
printf("committer-tz %s\n", ci.committer_tz);
- printf("filename %s\n", suspect->path);
+ write_filename_info(suspect->path);
printf("summary %s\n", ci.summary);
if (suspect->commit->object.flags & UNINTERESTING)
printf("boundary\n");
}
else if (suspect->commit->object.flags & MORE_THAN_ONE_PATH)
- printf("filename %s\n", suspect->path);
+ write_filename_info(suspect->path);
cp = nth_line(sb, ent->lno);
for (cnt = 0; cnt < ent->num_lines; cnt++) {