{"version":"2.1.281","anchor":"dir-sync-upload-respects-sparse-checkouts","canonical_anchor":"dir-sync-upload-respects-sparse-checkouts","heading":"Directory sync handles git sparse checkouts and non-UTF-8 file names","tier":"notice","area":"Cloud Sync","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/dir-sync-upload-respects-sparse-checkouts","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Directory sync handles git sparse checkouts and non-UTF-8 file names\n\nDirectory sync now reads core.sparseCheckout, so files skipped by a sparse checkout are no longer uploaded as deleted\n\n**What**\n\nDirectory sync uploads a copy of your project folder, for example to a cloud session. A sparse checkout is a git setup where only some of a repository's files are placed on disk. Sync now reads the git setting `core.sparseCheckout` and handles it:\n\n- Tracked files missing from disk count as deleted only when sparse checkout is off. In a sparse checkout they are treated as excluded.\n\n- Snapshots list index entries that git hides from the working folder (skip-worktree or sparse entries), re-read them, and log how many were found.\n\n- If `core.sparseCheckout` cannot be read, the snapshot fails with an error.\n\n- File paths are handled as raw bytes, which fixes file names that are not valid UTF-8. Checks for symlinked folders also work on path bytes.\n\n**Why**\n\nBefore, files skipped by a sparse checkout could be uploaded as deleted, which could remove them from the cloud copy. Repositories that use sparse checkout or skip-worktree entries now sync correctly.\n\n- Area: Cloud Sync\n- Names: `core.sparseCheckout`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}