-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any way to sync fewer merge commits when extracting a subfolder from a large repo? #1328
Comments
Interesting 🤔 "It's hard to reliably find them" also means: "it's hard to implement a rule to skip them". But I have been looking again at the history you posted in #952. The current rule is to keep a merge if the diff with either parent is non-empty. And to never change the number of parents a commit has. |
Yeah, I understand. And obviously keeping the round-trips working is very important. Even if you found a better heuristic now, I have no idea how we'd migrate to that given that we've already integrated all these merges into Miri's history. Though maybe it would be worth a single force-push to Miri... |
This could also be implemented in a new filter, or as an option for the |
I'm still a bit hesitant with moving Clippy over to Josh, because of this comment:
If this should be implemented, is there a way to move from the current If this is not planned to be implemented soon, I'll probably move to Josh anyway with the |
Sorry for the late response... |
Thanks for looking into this! I can definitely still wait a week or two or longer, if your idea works out but you need more time implementing it. |
@christian-schilling Did you get to looking into this? |
I've asked this before in #952 and was told "no", but maybe it's worth asking again... as other projects that have a presence in the Rust compiler monorepo are considering josh, we're seeing initial josh syncs that add more than 10k commits from the parent repo, meaning that about 1/3 of the commits in that history are not actually from the subproject. In Miri we have accumulated at least around 3500 of these commits (it's hard to reliably find them all so this is a lower bound), which is more than a quarter of the commits in Miri. rust-analyzer seems to be doing better, "only" getting around 1500 commits in the initial sync, which is around 5% of the total commits in that history.
These commits do not originate from the subrepo, so we don't need them to be preserved. But of course josh has no way of knowing that... maybe if we could tell it which part of the history is originally from the subrepo ("this is the subrepo HEAD, everything above this, if it exists in the parent repo, must be extracted perfectly"), it could be more "sloppy" on the remaining history? But I can see how that could be anything between tricky and complete nonsense...
Cc @flip1995 @lnicola
The text was updated successfully, but these errors were encountered: