1
0
mirror of https://github.com/git/git synced 2024-07-05 00:58:49 +00:00

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:
Alex Riesen 2007-08-10 15:06:22 +02:00 committed by Junio C Hamano
parent 21a02980f9
commit cbbb218f8b

1
refs.c
View File

@ -869,6 +869,7 @@ static int repack_without_ref(const char *refname)
die("too long a refname '%s'", list->name);
write_or_die(fd, line, len);
}
close(fd);
return commit_lock_file(&packlock);
}