fix: convert restored snapshots to bare mirrors with correct upstream URL#175
Draft
jrobotham-square wants to merge 1 commit intomainfrom
Draft
fix: convert restored snapshots to bare mirrors with correct upstream URL#175jrobotham-square wants to merge 1 commit intomainfrom
jrobotham-square wants to merge 1 commit intomainfrom
Conversation
… URL Snapshots are non-bare clones with remote.origin.url pointing to the cachew server URL (so end-user git pulls route through the proxy). When tryRestoreSnapshot restores these into the mirror path, backgroundFetch would attempt to fetch from the cachew URL, creating a self-referential loop that times out after 600 seconds. After restoring a snapshot, convert it to a bare repository layout and reset remote.origin.url to the actual upstream GitHub URL. Amp-Thread-ID: https://ampcode.com/threads/T-019cdb7b-f7b3-7028-a6d6-80369d19965a Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snapshots are non-bare clones with
remote.origin.urlpointing to the cachew server URL so end-user git pulls route through the proxy. WhentryRestoreSnapshotrestores these into the mirror path,backgroundFetchattempts to fetch from the cachew URL, creating a self-referential loop that times out after 600 seconds.This adds a
convertSnapshotToMirrorstep after snapshot restore that:.git/subdir) and converts them to bare layoutremote.origin.urlto the actual upstream GitHub URLcore.bare = true