Skip to content

Commit

Permalink
Teach core.autocrlf to 'git blame'
Browse files Browse the repository at this point in the history
Pass the fake commit through convert_to_git, so that the
file is adjusted for local line-ending convention.

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Marius Storm-Olsen authored and Shawn O. Pearce committed Oct 18, 2007
1 parent c5d236c commit 8f353ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin-blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,7 @@ static struct commit *fake_working_tree_commit(const char *path, const char *con
if (strbuf_read(&buf, 0, 0) < 0)
die("read error %s from stdin", strerror(errno));
}
convert_to_git(path, buf.buf, buf.len, &buf);
origin->file.ptr = buf.buf;
origin->file.size = buf.len;
pretend_sha1_file(buf.buf, buf.len, OBJ_BLOB, origin->blob_sha1);
Expand Down

0 comments on commit 8f353ee

Please sign in to comment.