-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
git subtree crashes: can't sync rustc clippy changes into rust-lang/rust-clippy #5565
Comments
The same happens for me, but I assumed that it was just my git version or something. The closest thing to find for this problem was this SO question: https://stackoverflow.com/questions/57033081/git-subtree-push-fail-applications-xcode-app-contents-developer-usr-libexec-gi This mailinglist question is also relevant: https://lore.kernel.org/git/0F754615-C852-49D8-8E0C-DD2A00A15ED1@msys.ch/t/ |
We've had some discussion on discord. The problem is that it's running out of stack space. So |
https://public-inbox.org/git/20180928183540.48968-4-roger.strain@swri.org/ This is the subtree patch that caused this. |
Perhaps we could move a copy of the |
Citing myself from Discord:
But we can handle this recursion, since it only trips over commits from the Clippy repo (8500 commits can be searched in ~10-20min and we only have to do this once with the steps below)
The 4th step will prevent At least that's how I understood the problem and solution from the mailing list and the git PR. |
The problem with |
Yeah, but the option is to wait half an hour for every sync in the future after gitgitgadget/git#493 is merged. Until then, we have to use the I think we found what I see two practical options here, both include to declare the attempt to switch to
|
Let's try to explore all non-submodule avenues first.
So let's start with the "what we want" part. We want
The trivial solution (but losing history) is to check out clippy, copy The complex solution is to write a "good" version of
If This all assumes that Since we moved from a So basically we can replay
where the And at this point I'm realizing that we'll have the duplicate synthetic commits back in the rustc repo anyway at the next merge (so at |
I wonder if we could somehow generate patches from rustc |
It seems to work if I manually fix the path inside the patch (we could have a tool that does that). EDIT: I have not tried this on merges though, hmm. |
It's been running for over an hour for me now... The number it's showing is in the 50k range, not sure what that means. Maybe it just went into an infinite loop somewhere?
Yea, I think the difficulty is figuring out the commit graph that we need to move and then recreate the branches by doing what you did with commits and then creating new merges just between these synthetic branches. I'm assuming that's how |
I think the root question is whether we care about seeing rustc history to clippy in the clippy repo. |
IIUC that is what gitgitgadget/git#493 is trying to fix in
and, therefore, goes through every commit of the external repo.
According to this Medium aritcle this should be possible with just
Have you installed the updated version from the PR I posted? This rather indicates, that it is half through the rust repo 😄 For me it has gone thorugh every commit on
It is not a prio IMO. Nice to have, but also ok if we lose that. |
Well it loses the history, but we got the history through subtree already. Between the history and the subrepo, there would only be two commit:
(Semi-serious comment) This thought experiment is showcased here: rust-lang/rust@master...flip1995:subrepo_move |
Ok, so I'm all for using the patched git, but the patch hasn't seen any action lately as far as I can tell. Since only clippy maintainers need it, we just need an instruction set on how to use the patched git (or maybe once we have it in a stable state we don't need the patched version anymore?)
I realized this happens anyway when you do |
Yes sadly, but AFAICT only the documentation of the new commands is missing. Maybe we could take over and push this over the finish line?
I have a stable version here: https://github.com/flip1995/rust/tree/clippyup But also with this version the unpatched |
ok, yea, let's try to revive that PR. Reading the repo docs makes me think that we need to interact with the mailing list in order to move it ahead, but maybe documenting it and openening a new PR will speed things up |
Yeas git is managed over mailing list contributions, but gitgitgadget will let us use the GitHub workflow for most of the things. |
As a data point, with the patched |
Only the first time. Once it is cached, it is a matter of seconds. Still not optimal though. |
Cached where? |
Yup, running again only took 20 seconds. The |
The command to sync rustc-changes into the clippy repo
crashes on my and @oli-obk s machine which means we can't sync clippy that way.
$ git subtree push -P src/tools/clippy git@github.com:matthiaskrgr/rust-clippy2 sync-from-rust
We need to figure out a way to work around that.
The text was updated successfully, but these errors were encountered: