Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
87 lines
2.2 KiB
Bash
Executable File
87 lines
2.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='pulling from symlinked subdir'
|
|
|
|
. ./test-lib.sh
|
|
|
|
# The scenario we are building:
|
|
#
|
|
# trash\ directory/
|
|
# clone-repo/
|
|
# subdir/
|
|
# bar
|
|
# subdir-link -> clone-repo/subdir/
|
|
#
|
|
# The working directory is subdir-link.
|
|
|
|
test_expect_success SYMLINKS setup '
|
|
mkdir subdir &&
|
|
echo file >subdir/file &&
|
|
git add subdir/file &&
|
|
git commit -q -m file &&
|
|
git clone -q . clone-repo &&
|
|
ln -s clone-repo/subdir/ subdir-link &&
|
|
(
|
|
cd clone-repo &&
|
|
git config receive.denyCurrentBranch warn
|
|
) &&
|
|
git config receive.denyCurrentBranch warn
|
|
'
|
|
|
|
# Demonstrate that things work if we just avoid the symlink
|
|
#
|
|
test_expect_success SYMLINKS 'pulling from real subdir' '
|
|
(
|
|
echo real >subdir/file &&
|
|
git commit -m real subdir/file &&
|
|
cd clone-repo/subdir/ &&
|
|
git pull &&
|
|
test real = $(cat file)
|
|
)
|
|
'
|
|
|
|
# From subdir-link, pulling should work as it does from
|
|
# clone-repo/subdir/.
|
|
#
|
|
# Instead, the error pull gave was:
|
|
#
|
|
# fatal: 'origin': unable to chdir or not a git archive
|
|
# fatal: The remote end hung up unexpectedly
|
|
#
|
|
# because git would find the .git/config for the "trash directory"
|
|
# repo, not for the clone-repo repo. The "trash directory" repo
|
|
# had no entry for origin. Git found the wrong .git because
|
|
# git rev-parse --show-cdup printed a path relative to
|
|
# clone-repo/subdir/, not subdir-link/. Git rev-parse --show-cdup
|
|
# used the correct .git, but when the git pull shell script did
|
|
# "cd $(git rev-parse --show-cdup)", it ended up in the wrong
|
|
# directory. A POSIX shell's "cd" works a little differently
|
|
# than chdir() in C; "cd -P" is much closer to chdir().
|
|
#
|
|
test_expect_success SYMLINKS 'pulling from symlinked subdir' '
|
|
(
|
|
echo link >subdir/file &&
|
|
git commit -m link subdir/file &&
|
|
cd subdir-link/ &&
|
|
git pull &&
|
|
test link = $(cat file)
|
|
)
|
|
'
|
|
|
|
# Prove that the remote end really is a repo, and other commands
|
|
# work fine in this context. It's just that "git pull" breaks.
|
|
#
|
|
test_expect_success SYMLINKS 'pushing from symlinked subdir' '
|
|
(
|
|
cd subdir-link/ &&
|
|
echo push >file &&
|
|
git commit -m push ./file &&
|
|
git push
|
|
) &&
|
|
echo push >expect &&
|
|
git show HEAD:subdir/file >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_done
|