Hacker Newsnew | past | comments | ask | show | jobs | submit | schusterfredl's commentslogin

amen.

mergetopus is a tool that helps teams follow a structured workflow for very large merges by splitting one risky merge into parallelizable tasks:

* one integration branch for trivial/non-conflicting merge results * optional slice branches for selected conflicted files * original annotate/blame information is retained


I have long wanted a tool to help split large diffs into smaller semantic changes. When you're working on a feature, for example, and end up refactoring along the way, you may wish to have your refactor reviewed and merged without any new functionality.

That's when you should stop your work, make a new branch from main, do the refactoring and offer it separately; it's about (self) discipline in the end. You can probably also do something creative with cherry-pick and the like.

Sometimes I do this, but sometimes it's just more work than it's worth. I have started to do this a bit more with language models to help reduce the toil, but I yearn for a more rigorous method.

It’s painful but this is the way. Especially if your team is slow at merging.

Given a commit that both refactors (A) and adds a feature (B), you can go into the codebase and remove the new feature by hand (B^-1), commit the feature removal, and immediately revert the feature removal. This leads to three commits: (A B), B^-1, and B. Squash the first two commits to obtain a commit that only refactors, and another commit that only adds the new feature. I've written more about this technique ("the Hammer") here: https://github.com/Mortal/gittalk

> * one integration branch for trivial/non-conflicting merge results

Doesn't this mean the integration branch will be missing key updates, thus it's expected to be broken?


hey, someone actually reads the docs :D

no, the integration branch is not "broken", its just not complete until all slices have been merged INTO the integration branch - after all slices have been merged, the integration branch is complete, yet has a non-optimal history (and most likely a wrong blame because of how git resolves the blame), - therefore the "kokomeco" branch is created after the slices have been merged, - there the original intended merge is done because the outcome of the conflicts is already known from the integration + slice branch merges.

Feel free to open issues/questions in the repo if you're interested, I merely stumble by ycombinator


> no, the integration branch is not "broken", its just not complete until all slices have been merged INTO the integration branch

What do you call an incomplete branch that is missing slices?

> after all slices have been merged, the integration branch is complete, yet has a non-optimal history (and most likely a wrong blame because of how git resolves the blame)

What is the value proposition then? Broken integration branches that leave a suboptimal history? What am I missing?

> Feel free to open issues/questions in the repo if you're interested, I merely stumble by ycombinator

I don't think there is a compelling reason to use this tool. It messes commit history and leaves integration branches in a broken state? Not a great selling point. The alternative would be to sync with branches using standard flows such as rebasing and merges from base branches. You don't need a tool for that, only a hello world tutorial on Git.


> What do you call an incomplete branch that is missing slices?

"incomplete", evidently. I don't see a real alternative here - you need some working space for an in-progress merge, and if you want to do the merge collaboratively, you'll want it on a branch. Just don't run CI on that branch till the merge is complete.

> Broken integration branches that leave a suboptimal history? What am I missing?

You appear to be missing the next step, where they use the merge resolutions from that suboptimal history to replay the original merge, giving you back nice clear history (and at this point, the integration branch can be discarded, presumably)


^ you got it right, nothing to add here :)

WinGet is not a package manager. (never was, and probably never will be)

this 'old' thread still nails it: https://github.com/microsoft/winget-cli/discussions/223

it's just sad.

use Chocolatey, if you can't for some reason try Scoop.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: