2 ms·
To quote: OK, so the bug never trigged in 16,000+ Linux kernel merges—kernel developers are probably sane people quite proficient in git so that's quite unlikel
by yason 15y ago
To quote: OK, so the bug never trigged in 16,000+ Linux kernel merges—kernel developers are probably sane people quite proficient in git so that's quite unlikely to happen. That's probably the reason the bug was out there for a year, nobody ever bumped into it. I would bet some money on none of them kernel developers ever having git-pulled into a dirty working tree. (Most of the newbies around the world who probably bumped into it didn't understand git was in error there—excluding the author.)
I can't explain why the opposite happens. Most of the people I know intuitively commit or stash their local changes before merging. They have this intuition even if git is relatively young piece of software. But then there are always a handful of people that I imagine who could do something like that. And I'm not quite sure why.
One possibility is that it could come down to the level of trust in computers. I don't think I could issue git-merge without git-stash/git-commit first—probably because I don't instictively trust programs to handle complex operations too well in the first place. Operations such as handling unsaved data or letting random commits from different place three-way merge themselves into a single branch. Or both.
This mechanism of distrust might be similar to how drivers who think they're bad drivers are, in fact, the best drivers. They underestimate their capabilities enough to assume everything won't always go right, and then they're a few steps ahead when something goes wrong.