Fix filehandle leak in "git branch -D"
On Windows (it can't touch open files in any way) the following fails: git branch -D branch1 branch2 if the both branches are in packed-refs. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
21a02980f9
commit
cbbb218f8b
1
refs.c
1
refs.c
@ -869,6 +869,7 @@ static int repack_without_ref(const char *refname)
|
|||||||
die("too long a refname '%s'", list->name);
|
die("too long a refname '%s'", list->name);
|
||||||
write_or_die(fd, line, len);
|
write_or_die(fd, line, len);
|
||||||
}
|
}
|
||||||
|
close(fd);
|
||||||
return commit_lock_file(&packlock);
|
return commit_lock_file(&packlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user