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:

committed by
Junio C Hamano

parent
88e7fdf2cb
commit
ac78e54804
7
entry.c
7
entry.c
@ -79,7 +79,6 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
|
||||
}
|
||||
switch (ntohl(ce->ce_mode) & S_IFMT) {
|
||||
char *buf;
|
||||
unsigned long nsize;
|
||||
|
||||
case S_IFREG:
|
||||
if (to_tempfile) {
|
||||
@ -96,12 +95,10 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
|
||||
/*
|
||||
* Convert from git internal format to working tree format
|
||||
*/
|
||||
buf = new;
|
||||
nsize = size;
|
||||
if (convert_to_working_tree(ce->name, &buf, &nsize)) {
|
||||
buf = convert_to_working_tree(ce->name, new, &size);
|
||||
if (buf) {
|
||||
free(new);
|
||||
new = buf;
|
||||
size = nsize;
|
||||
}
|
||||
|
||||
wrote = write_in_full(fd, new, size);
|
||||
|
Reference in New Issue
Block a user