Skip to content

Commit

Permalink
Merge branch 'sr/blame-incomplete'
Browse files Browse the repository at this point in the history
* sr/blame-incomplete:
  blame: make sure that the last line ends in an LF
  • Loading branch information
Junio C Hamano committed Nov 10, 2009
2 parents 466d1f1 + a5ca836 commit 25dfd1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin-blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 25dfd1b

Please sign in to comment.