Browse Source

Teach core.autocrlf to 'git blame'

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>
maint
Marius Storm-Olsen 17 years ago committed by Shawn O. Pearce
parent
commit
8f353ee57a
  1. 1
      builtin-blame.c

1
builtin-blame.c

@ -2059,6 +2059,7 @@ static struct commit *fake_working_tree_commit(const char *path, const char *con @@ -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);

Loading…
Cancel
Save