3 ms·
Git should have issue support or something like it as a convention but pull requests are an abomination that we are stuck with. No thank you.
by mhh__ 1y ago
Git should have issue support or something like it as a convention but pull requests are an abomination that we are stuck with. No thank you.
- torben-friis 1y agoCan you expand on that? I’m probably younger but I can’t imagine a more comfortable way to review code.
- eru 1y agoPull requests are great, but the typical github UI isn't necessarily the best way to review code. It's often useful. But sometimes you want to use other tools, like firing up your editor to explore.
- mhh__ 1y agoNo, they're terrible. We should be reviewing stacks of commits not branches
- IshKebab 1y agoWhy? A branch is a stack of commits.
- Dylan16807 1y agoThe workflow I believe they're talking about is like a branch but you can have multiple versions of the branch as you develop and refine it. And those updates are properly tracked by your version control, not done jankily by editing a commit and rebasing and force pushing.
- mhh__ 1y agoThen whence merge commits? A branch is a commit with a hat on, strictly speaking.
- eru 1y agoYes, a branch together with information about the intended point of divergence is a stack of commits. (Most of the time, the point of divergence is arrived at implicitly by specifying the intended mother branch, and git figures out the last common ancestor, ie the merge-base.) Let's call the branch-plus-point-of-divergence a 'PR branch'. Though your 'stack of commits' is more like a 'stack of diffs' (at least in the Git sense of commit-is-a-snapshot-of-the-whole-repo.) And actually, for better or worse, a PR branch is more expressive than a 'stack of commits', exactly for the reason you suggest: a PR branch can also contain merge commits, it doesn't have to be a linear chain.
- mhh__ 1y agoThey are often called stacked diffs yes.
- eru 1y agoBasically in terms of git speak branches are mutable pointers to immutable commits. (They are basically the only mutable thing in git.) What you'd need to do to support 'stacked diffs' or 'stacks of commits' is to keep a history of what you mutable pointers were doing. It's a 'meta-git'. Once you have that, you could build all the convenient operations on top of that abstraction. Btw, if memory serves right, git has some plugins (or whatever these things are called, plugins or so?) for implementing the stack of commits concept. I don't know whether they go the 'meta-git' route that I sketched, or whether they do something less abstract.
- baq 1y agoIt’s only good if you haven’t tried anything else. Check out gerrit, but there are many more tools and workflows. Note we’re talking about the GitHub UI mostly. Pulling and merging a remote branch is a basic git operation, almost a primitive.
- mhh__ 1y agoPhabricator.
- captn3m0 1y agoNot Git, but several forges are working towards an ActivityOub based federation format for these: https://f3.forgefriends.org/ https://f3.forgefriends.org/
- eru 1y agoGit was invented with pull requests in mind. It's just that they were originally meant to be sent via email, not on the web.