Simplify calling of CR/LF conversion routines

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Alex Riesen
2007-04-19 02:05:03 +02:00
committed by Junio C Hamano
parent 88e7fdf2cb
commit ac78e54804
6 changed files with 51 additions and 60 deletions

4
diff.c
View File

@ -1493,9 +1493,9 @@ int diff_populate_filespec(struct diff_filespec *s, int size_only)
/*
* Convert from working tree format to canonical git format
*/
buf = s->data;
size = s->size;
if (convert_to_git(s->path, &buf, &size)) {
buf = convert_to_git(s->path, s->data, &size);
if (buf) {
munmap(s->data, s->size);
s->should_munmap = 0;
s->data = buf;