>But you didn't write any tests before this diff, and as a result you broke >chmod.
Retrofitting test suite requires some effort and didn't do that now because... My apologies for two things: 1. I do, forgot to put question mark. My intention was to _ask_ for that code: "WTF this?" 2. I put that message to wrong mailing list. Questions with diff should definitely go to misc@ And now this thread sprawled long way to off course in wrong list... So, I don't answer in this thread any longer, and I hope we all can now shut down this spamming. Even I could easily refactor code to more sane in terms of function complexity, I don't want do that without test suite (there is probably available) because I don't want to take risk of breaking it. And, I don't do that even if I have that test suite, because I have doubt no one will not commit refactored version because there is opinions that monster function can be more readable. Nothing more to see here.