summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f73da29)
raw | patch | inline | side by side (parent: f73da29)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 29 Nov 2006 06:29:18 +0000 (22:29 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 29 Nov 2006 06:32:23 +0000 (22:32 -0800) |
We used to get the case that more than two paths came from the
same commit wrong when computing the output width and deciding
to turn on --show-name option automatically. When we find that
lines that came from a path that is different from what we
started digging from, we should always turn --show-name on, and
we should count the name length for all files involved.
Signed-off-by: Junio C Hamano <junkio@cox.net>
same commit wrong when computing the output width and deciding
to turn on --show-name option automatically. When we find that
lines that came from a path that is different from what we
started digging from, we should always turn --show-name on, and
we should count the name length for all files involved.
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 066dee743e9fdd80478395c605d9afc4682600c6..53fed4501ad9cb0d142bf516a743d1a487b0b04e 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
struct commit_info ci;
int num;
+ if (strcmp(suspect->path, sb->path))
+ *option |= OUTPUT_SHOW_NAME;
+ num = strlen(suspect->path);
+ if (longest_file < num)
+ longest_file = num;
if (!(suspect->commit->object.flags & METAINFO_SHOWN)) {
suspect->commit->object.flags |= METAINFO_SHOWN;
get_commit_info(suspect->commit, &ci, 1);
- if (strcmp(suspect->path, sb->path))
- *option |= OUTPUT_SHOW_NAME;
- num = strlen(suspect->path);
- if (longest_file < num)
- longest_file = num;
num = strlen(ci.author);
if (longest_author < num)
longest_author = num;