3 ms·
If a patch is in an email then how do you know which parent commit it should be applied to? A patch is not a thing in its own right in isolation; it should com
by da39a3ee 6y ago
If a patch is in an email then how do you know which parent commit it should be applied to? A patch is not a thing in its own right in isolation; it should come with a specified parent thus identifying a unique code context in which it is correct. Just because it applies cleanly on a branch does not mean it is correct there.
- sreevisakh 6y agoI have wondered the same too for a long time. But I have never seen the branching commit mentioned. Instead, most of the contributor documentation just ask you to rebase your feature branch on the latest master (or whatever it is called now) and send in those patches. I believe that patchset application is treated the same way as rebasing. It should be possible to apply patches to the master without conflicts as long as the two branches haven't diverged too much. In case the branches did diverge a lot, the contributor is expected to sort it out by the rebase mentioned above. Patch workflow forces you to think about diff introduced by each commit, instead of worrying only about conflicts between two branches when merging. Ultimately, it requires care and discipline from contributor and maintainer that is not strictly necessary with fork-PR workflow. However, commit quality would improve a lot if the same discipline was followed everywhere.
- da39a3ee 6y agoThanks, so yours and the sibling reply by @worldmaker seem more argument against the email workflow. I honestly think it's just smart people being stubborn; men over 50 finding it hard to relinquish what were core tenets of internet-based development in the 90s.
- WorldMaker 6y agoThis is one reason I far more trusted email workflows around darcs than I do with git. In darcs patches were first class objects (including a ton of context information), but in git that sort of information has to travel in manually and in parallel in the email thread.