What do I do with a patch file?

Knowing how to use Git with email revealed what narrow experience I really had.

spore@lemmy.ml wrote this comment:

Honestly I’m surprised that so many people don’t know how git can be used without those repository hosting sites. That’s one way to use it, not the only way. And it’s not even the way it was originally designed for.

I’m not surprised any more.

One time I was in a successful, growing, profitable, mid-sized software company. The source code was hosted on GitHub. For some reason the lead developers couldn’t see my pull request, or couldn’t review it (or whatever). Rather than waiting for an overworked manager to toggle some acess control switches, I just sent the change as a patch using git format-patch. The lead devs were confused and didn’t know what to do with it.

Open-source to closed-source

Why I’m not surprised is because we came from different backgrounds. I fell into the computer world after my Bachelor’s degree in Medical Science. I’m self-taught thanks to open-source projects, so I’m most familiar with those cultures and workflows. When Go didn’t support an OpenBSD syscall, I just downloaded the tree, added the syscall, and ran my own compiled version of Go for a few months.

When I started working in the tech world for, you know, money, I felt lost. Reading or submitting fixes to code maintained by different teams now meant finding some manager’s manager or wondering in to a meeting room unannounced with genuine curiosity. Sometimes I just waited for weeks. At the worst of times people got hostile (thankfully no hostility at the company in this particular story!).

Our different experience

The lead devs didn’t know what to do with the patch file, but they did know how to remain happy and productive waiting for the gears of enterprise to turn. Familiarity of access control problems in commercial software environments lets you plan ahead. There’s meetings and piles of pending code reviews to get to already.

In this world, git format-patch is something you’d never come across. I spent time reading how others keep changes small and how to apply them with minimum tooling (as plain-text patches). They spent time learning how to communicate changes to an organisation in face-to-face settings with minimum commercial risk.

Eventually the GitHub admin did their thing, and someone merged the change with no comments.