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
@ -2277,10 +2277,9 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,
|
||||
*/
|
||||
if ((type == OBJ_BLOB) && S_ISREG(st->st_mode)) {
|
||||
unsigned long nsize = size;
|
||||
char *nbuf = buf;
|
||||
if (convert_to_git(path, &nbuf, &nsize)) {
|
||||
if (size)
|
||||
munmap(buf, size);
|
||||
char *nbuf = convert_to_git(path, buf, &nsize);
|
||||
if (nbuf) {
|
||||
munmap(buf, size);
|
||||
size = nsize;
|
||||
buf = nbuf;
|
||||
re_allocated = 1;
|
||||
|
Reference in New Issue
Block a user