4 ms·
The commit message could have answered that question, but instead, it only repeats what the diff already tells us: "Don't allow special characters in sandbox ru
by js2 2y ago
The commit message could have answered that question, but instead, it only repeats what the diff already tells us: "Don't allow special characters in sandbox rule paths". It doesn't explain why, or what's special about the particular characters that it disallows. A better message would have said something like "Prevent certain characters in the path because otherwise ... We need to worry about these specific characters but not others because..."
Even if I wrote this code and knew what it did today, if I come across this it a year from now, I'm left scratching my head: why did I make this change?
A real world example of a good commit message:
https://github.com/git/git/commit/92fe7c7d42cc941ed70d6fce988d6b7936a9765a https://github.com/git/git/commit/92fe7c7d42cc941ed70d6fce98...