Junio C Hamano <junkio@xxxxxxx> wrote: > I agree leaking fd is not nice, but I wonder if that should be > dealt with by the caller. > > Originally it did not matter as open_packed_git() died, but > shouldn't it be closing the fd and marking p->pack_fd with -1, as > you made it return instead of die? Yea, I thought of that when I wrote that evil patch... But open_packed_git has 12 things that can cause it to return an error. That's basically a rewrite of the function. This was 4 lines added to the only caller which didn't die(). Probably the wrong thing to do. But the patch was shorter! Do you want to reject this patch and have me rewrite open_packed_git instead? -- Shawn. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html