Re: [PATCH 3/5] fast-import: clean up pack_data pointer in end_packfile

2014-08-25 Thread Ronnie Sahlberg
Print an error before returning when pack_data is NULL ? Otherwise, LGTM On Fri, Aug 22, 2014 at 10:27 PM, Jeff King p...@peff.net wrote: We have a global pointer pack_data pointing to the current pack we have open. Inside end_packfile we have two new pointers, old_p and new_p. The latter

Re: [PATCH 3/5] fast-import: clean up pack_data pointer in end_packfile

2014-08-25 Thread Jeff King
On Mon, Aug 25, 2014 at 10:16:52AM -0700, Ronnie Sahlberg wrote: Print an error before returning when pack_data is NULL ? I don't think so. We call end_packfile in some code paths (like the die handler) as close if it's open. So I think it makes sense for it to be a noop if nothing is open.

[PATCH 3/5] fast-import: clean up pack_data pointer in end_packfile

2014-08-22 Thread Jeff King
We have a global pointer pack_data pointing to the current pack we have open. Inside end_packfile we have two new pointers, old_p and new_p. The latter points to pack_data, and the former points to the new installed version of the packfile we get when we hand the file off to the regular sha1_file