-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Problem
pgxntool doesn't work when the extension lives in a subdirectory of a git repo (monorepo pattern). Three things break:
-
setup.sh:[ -d .git ] || git init— attempts git init when run from a subdirectory since.gitis in the parent. The README already says "This assumes that you've already initialized your extension in git", so the git init is unnecessary. -
update-setup-files.sh:[[ -d ".git" ]]check fails in subdirectories. Should usegit rev-parse --is-inside-work-treewhich works anywhere in a worktree. -
base.mksync target: Hardcodes-P pgxntoolingit subtree pull. This prefix is relative to git root, so in a subdirectory likesubdir/, the prefix needs to besubdir/pgxntool. Should compute dynamically usinggit rev-parse --show-prefix.
Files to modify
setup.sh— Remove git initupdate-setup-files.sh— Fix.gitdirectory checkbase.mk— Dynamic subtree prefix in sync targets
Dependencies
Depends on #16 (end-to-end test for make pgxntool-sync) being completed first, since the subdirectory work modifies the sync target's -P prefix logic and we want test coverage before changing it.