summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-11-10 12:29:53 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-10 12:29:53 -0800
commit25dfd1b925f51a88b00cf0c84c690d448395c30f (patch)
tree80018c96c2bf6f4c88a150b29d6482bebec6d219
parentgit-update-index.txt: Document the --really-refresh option. (diff)
parentblame: make sure that the last line ends in an LF (diff)
downloadtgif-25dfd1b925f51a88b00cf0c84c690d448395c30f.tar.xz
Merge branch 'sr/blame-incomplete'
* sr/blame-incomplete: blame: make sure that the last line ends in an LF
-rw-r--r--builtin-blame.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 7512773b40..dd16b22297 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -1604,6 +1604,9 @@ static void emit_porcelain(struct scoreboard *sb, struct blame_entry *ent)
} while (ch != '\n' &&
cp < sb->final_buf + sb->final_buf_size);
}
+
+ if (sb->final_buf_size && cp[-1] != '\n')
+ putchar('\n');
}
static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
@@ -1667,6 +1670,9 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
} while (ch != '\n' &&
cp < sb->final_buf + sb->final_buf_size);
}
+
+ if (sb->final_buf_size && cp[-1] != '\n')
+ putchar('\n');
}
static void output(struct scoreboard *sb, int option)