-
Notifications
You must be signed in to change notification settings - Fork 413
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
Total overhaul of the fetch loop for v4 #691
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thockin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I am so sorry for this one :) |
The previous (v3) sync loop betrays my lack of understanding about git. It tried to codify my archaic mental model (e.g. --branch and --rev being disting things) and was ultimately a patchwork of corner-cases evolved over a few years. This commit is less of a "diff" and more of a "rewrite". The new logic is simpler and more efficient. It does not `git clone` ever. It does not differentiate the first sync from subsequent syncs. It uses `git fetch` to get the exact SHA and then makes a worktree from that. The new `--ref` flag replaces both `--rev` and `--branch`, though it will use those if specified. In fact, almost all of the e2e tests passed without change - using --ref and --branch! I will follow this commit up with more cleanups and e2es.
32cc933
to
35323a2
Compare
I self-merged some of the smaller ones before this, but stopped here for now. I'd love to have extra eyes on it, but if everyone is too busy, I don't mind pushing ahead to shoot for a v4 RC. |
self-merge to make progress |
Damn thought you self merged all. Will review after the fact once I have some capacity. So don't mind you merging your progress. |
No sweat, this was a LOT of load to dump, and I have more queued up! :)
…On Mon, Apr 24, 2023, 1:35 AM Michael Grosser ***@***.***> wrote:
Damn thought you self merged all. Will review after the fact once I have
some capacity. So don't mind you merging your progress.
—
Reply to this email directly, view it on GitHub
<#691 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKWAVBCVGMCLEZGVXNR6CLXCY3O3ANCNFSM6AAAAAAVIDM3LU>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
This one is a doozy but can't easily be broken up further. I have a dozen more on top of this, building to a v4 release candidate, I hope.
The previous (v3) sync loop betrays my lack of understanding about git. It tried to codify my archaic mental model (e.g. --branch and --rev being disting things) and was ultimately a patchwork of corner-cases evolved over a few years.
This commit is less of a "diff" and more of a "rewrite".
The new logic is simpler and more efficient. It does not
git clone
ever. It does not differentiate the first sync from subsequent syncs. It usesgit fetch
to get the exact SHA and then makes a worktree from that.The new
--ref
flag replaces both--rev
and--branch
, though it will use those if specified. In fact, almost all of the e2e tests passed without change - using --ref and --branch!I will follow this commit up with more cleanups and e2es.