diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-16 08:07:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-16 08:07:07 +0100 |
commit | 061c4d0829df96d00d3972748d4325631e5fb432 (patch) | |
tree | 3a47d5abeae662bb4890836ef5675a781ac156db | |
parent | Merge branch 'jc/maint-blank-at-eof' into maint (diff) | |
parent | blame: make sure that the last line ends in an LF (diff) | |
download | git-061c4d0829df96d00d3972748d4325631e5fb432.tar.xz git-061c4d0829df96d00d3972748d4325631e5fb432.zip |
Merge branch 'sr/blame-incomplete' into maint
* sr/blame-incomplete:
blame: make sure that the last line ends in an LF
-rw-r--r-- | builtin-blame.c | 6 |
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) |