aboutsummaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-04-19 02:05:03 +0200
committerJunio C Hamano <junkio@cox.net>2007-04-20 23:24:34 -0700
commitac78e548049f4e86b38368d2c4b4dbb546c64ac6 (patch)
tree37994b847883946eefb34b50d53549335525d428 /diff.c
parent88e7fdf2cb436e068434241b0519577293055c19 (diff)
downloadgit-ac78e548049f4e86b38368d2c4b4dbb546c64ac6.tar.gz
git-ac78e548049f4e86b38368d2c4b4dbb546c64ac6.tar.xz
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>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 5f501864e..1cb1230a9 100644
--- a/diff.c
+++ b/diff.c
@@ -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;