Skip to content

fix(core): advance git cache HEAD on refresh without ref - #215

Merged
ulises-jeremias merged 1 commit into
mainfrom
fix/git-cache-refresh-pulls-remote-tip
Jul 18, 2026
Merged

fix(core): advance git cache HEAD on refresh without ref#215
ulises-jeremias merged 1 commit into
mainfrom
fix/git-cache-refresh-pulls-remote-tip

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Summary

  • On cache refresh without ?ref=, reset to remote default tip (origin/HEAD / origin/main) instead of fetch-only
  • Force refresh when the requested subdir is missing even if cache meta is still "fresh"
  • Adds regression tests covering rename-style layout updates

Closes#214

CNA reference

  • packages/create-node-app-core/git.ts refresh path (checkout -f + pull)

Test plan

  • uv run pytest packages/create-python-app-core/tests/test_git_cache.py -q
  • uv run ruff check + pyright on git_cache.py
  • After merge/release: uvx create-awesome-python-app --template fastapi-starter --addons github-setup --refresh always

Made with Cursor

Fetch alone left stale clones behind origin after template-bank renames.
Reset to origin/HEAD (CNA pull parity) and force refresh when a configured
subdir is missing from a warm cache.
Closes#214
Co-authored-by: Cursor <cursoragent@cursor.com>
@ulises-jeremias
ulises-jeremias merged commit 75601c7 into mainJul 18, 2026
13 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: git cache refresh fetches but does not update HEAD when ref is unset

1 participant

@ulises-jeremias