From: Jeff King Date: Sat, 21 Dec 2013 14:00:06 +0000 (-0500) Subject: pack-objects: split add_object_entry X-Git-Tag: v2.0.0-rc0~148^2~16 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ce2bc42456b88c5f01f7f591cf0cc9db1a5bfc3d?ds=inline;hp=ce2bc42456b88c5f01f7f591cf0cc9db1a5bfc3d pack-objects: split add_object_entry This function actually does three things: 1. Check whether we've already added the object to our packing list. 2. Check whether the object meets our criteria for adding. 3. Actually add the object to our packing list. It's a little hard to see these three phases, because they happen linearly in the rather long function. Instead, this patch breaks them up into three separate helper functions. The result is a little easier to follow, though it unfortunately suffers from some optimization interdependencies between the stages (e.g., during step 3 we use the packing list index from step 1 and the packfile information from step 2). More importantly, though, the various parts can be composed differently, as they will be in the next patch. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---