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>
Alex Riesen committed
Aug 10, 2007 at 15:06 UTC
cbbb218f8bd219d79907623a9304496ee69d8abd
1 file changed
+1
refs.c
+1
@@ -869,6 +869,7 @@ static int repack_without_ref(const char *refname)
869
die("too long a refname '%s'", list->name);
870
write_or_die(fd, line, len);
871
}
872
+ close(fd);
873
return commit_lock_file(&packlock);
874
}
875