deep/magic: Commit changes even if not dirty.
Changesets are somewhat magical these days (obviously!); even if they are
not dirtied; they could end up being really, *really* bogus as far as
their on-disk status. The reason, as far as I can tell, is that in
deep/wizardry, we are being very liberal about our modifications to the
on-disk data structures without actually considering whether or not any
other owner of that structure is pending changes to commit. As a result,
we could end up heavily corrupting these structures if we're not careful.
I'm not altering the comments in the file because, frankly, the comments
imply that we should have already been doing this. I just changed the
code to match.
Fixes #4242. Finally! Time to go grab a beer. :3
Tests: +5 working
mad/deep/magic.py | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
I would prefer to see that rationale in the comments or some implementation doc or something. In the git history it's eventually going to be troublesome to unearth, unless the change remains intact enough for "git blame" to give you a pointer to that old commit, or your whole team standardizes keywords for more searchable commit messages. And if your team does have a way to find that explanation, you then need some way for them to discover whether it has become inaccurate over time.
Comments about the change itself, and the rationale behind it, should go in commit messages. Comments about the implementation itself should go in the code. Granted, there is some overlap between the two, in which case, go with code only (since it's part of the commit anyway).
You are implying that "the team" actually reads that section of the code, and furthermore that they will actually attempt to fix any issues found in that section rather than just go find the original author and ply him with beer to get him to fix it.