by mehrdadn · 8y ago · 0 comments
The difference, I would say, is that installers and packages are created by ops people, and Git hooks are written by developers or devops people. Decide for yourself which one is more likely to make a mistake that reformats your system. (It's actually a hard question: developers are usually more precise with syntax in languages [like Bash] where ambiguous syntax can be dangerous; while ops people are better at understanding the system-level implications of the actions they're asking the system to perform.)
(Also, unlike installers or packages, there's no reason for a Git repo's hooks to be privileged to do anything outside of the Git repo's cloned .git dir + worktree. If Git wanted synced scriptability, it would be a perfect case for application-level sandboxing, using system calls like OpenBSD's pledge(2).
This is what you're missing though. No proper programming language performs automatic word splitting on spaces. Only shell scripting languages like like Bash do. There's a reason I didn't conflate "script" with "app" like you guys have. Scripts are both missing critical features for robust coding and also make it really easy to play fast and loose with everything. "Decide for yourself which one is more likely to make a mistake that reformats your system" is exactly what I have done in making the distinction here.