chore(fetch): refresh dependencies in place#71
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| if repo_path.is_dir(): | ||
| _run_git(['-C', str(repo_path), 'fetch', '--prune']) | ||
|
|
||
| if branch: | ||
| _run_git(['-C', str(repo_path), 'checkout', branch]) | ||
|
|
There was a problem hiding this comment.
[P1] Fetch tags before checking out tag revisions
The refresh path only runs git fetch --prune before attempting git checkout <branch> when a dependency already exists. If the "branch" field in repos.json references a tag (all current entries do), git fetch --prune does not download new or updated tags. When the pinned tag changes (for example updating from v2.1.0 to v2.1.1) or a tag is re-pointed upstream, the checkout will fail with pathspec '<tag>' did not match any files and the dependencies cannot be refreshed in place. Consider fetching tags explicitly (e.g. git fetch --tags or git fetch origin tagname) before attempting the checkout so tag-based revisions can be updated.
Useful? React with 👍 / 👎.
Summary
fetch_repos.pygit fetch, checkout/reset, and submodule updatesfetch_repos.pyrefreshes pinned revisions in the README and dev setup guideTesting
https://chatgpt.com/codex/tasks/task_e_68cc86f5edc0832495a9f0214460de09