Skip to content

feat: add Git resolution callback - #162

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/feat-git-resolved-callback
Aug 10, 2026
Merged

feat: add Git resolution callback#162
chenjiahan merged 1 commit into
mainfrom
chenjiahan/feat-git-resolved-callback

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

This PR adds an onGitResolved callback so project generators can conditionally add Git-root-only files after template copying and Git setup. The flat callback context exposes templateName, distFolder, gitEnabled, and isGitRoot, including read-only root detection when Git initialization is disabled. Git root detection now uses rev-parse --is-inside-work-tree --show-prefix and reuses the initialization result to avoid redundant checks.

@chenjiahan
chenjiahan merged commit 1de79a4 into main Aug 10, 2026
4 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/feat-git-resolved-callback branch August 10, 2026 08:55
Sign up for free to 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.

1 participant