2007/7/3, Dan McGee <dpmcgee@gmail.com>:
On 7/3/07, Andrew Fyfe <andrew@neptune-one.net> wrote:
Ok how about this (see the attached code snippet).
_alpm_add_commit() is a BIG function, the code attached only shows the for loop for extracting the files and I've cut out the code for checking backups().
<snip> On a side note, Xavier has a clean_add branch you may want to work off of.
Well, that's exactly the reason I wanted to do this refactoring, because I needed to look at add_commit for these extraction problem, and I wanted to isolate things for making the code easier to read and edit. There was also an suggestion from Aaron for refactoring this huge add_commit function that made a lot of sense to me: http://www.archlinux.org/pipermail/pacman-dev/2006-December/006286.html But I miserably failed trying to do this refactoring. It's currently totally broken (by the last commit) :( And I don't think I'm able to fix it, there is just too many code in this function, and too many variables to handle.. But too complicated for me doesn't mean it wouldn't be easy for some people.