Fix sync failures on stale blob SHAs and ignore volatile sync log metadata#58
Open
tiagoarroz wants to merge 2 commits into
Open
Fix sync failures on stale blob SHAs and ignore volatile sync log metadata#58tiagoarroz wants to merge 2 commits into
tiagoarroz wants to merge 2 commits into
Conversation
agungwas
added a commit
to agungwas/github-gitless-sync
that referenced
this pull request
May 14, 2026
- fix(sync): process ZIP entries sequentially to prevent memory exhaustion on large vaults during initial sync from remote (refs silvanocerza#24) - fix(sync): add null guard before setting sha on delete_remote tree item to prevent TypeError on mobile when file entry is missing (refs silvanocerza#52, silvanocerza#28) - fix(sync): use SHA as primary truth in determineSyncActions instead of timestamps, preventing files modified by plugins or external tools from being silently skipped on sync - fix(sync): correct inverted syncConfigDir condition in ZIP extraction that caused .obsidian folder to be skipped when config sync was enabled - fix(sync): auto-reconcile config dir files into metadata on loadMetadata when syncConfigDir is true, so users no longer need to toggle the setting after enabling it - fix(sync): recover from stale blob SHAs by falling back to current tree SHA on 404 responses, preventing sync failures after force-pushes (refs silvanocerza#58) - fix(sync): exclude volatile sync artifacts (github-sync.log) from metadata and conflict detection to prevent recurring false conflicts - fix(sync): reconcile remote metadata SHAs with live tree on each sync to remove stale references before conflict detection runs - fix(sync): add null guards on metadataStore.data.files before setting sha to prevent TypeError on new files not yet in local metadata
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.
Problem
Sync could fail with
404 Not FoundonGET /git/blobs/{sha}when remote metadata referenced stale blob SHAs.This caused sync to abort repeatedly.
What changed
.obsidian/github-sync.logfrom normal metadata/conflict flow as a volatile internal artifact.Expected result