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>
84 lines
2.3 KiB
Bash
Executable File
84 lines
2.3 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='test diff with a bogus tree containing the null sha1'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'create bogus tree' '
|
|
name=$(echo $ZERO_OID | sed -e "s/00/Q/g") &&
|
|
bogus_tree=$(
|
|
printf "100644 fooQ$name" |
|
|
q_to_nul |
|
|
git hash-object --literally -w --stdin -t tree
|
|
)
|
|
'
|
|
|
|
test_expect_success 'create tree with matching file' '
|
|
echo bar >foo &&
|
|
git add foo &&
|
|
good_tree=$(git write-tree) &&
|
|
blob=$(git rev-parse :foo)
|
|
'
|
|
|
|
test_expect_success 'raw diff shows null sha1 (addition)' '
|
|
echo ":000000 100644 $ZERO_OID $ZERO_OID A foo" >expect &&
|
|
git diff-tree $EMPTY_TREE $bogus_tree >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'raw diff shows null sha1 (removal)' '
|
|
echo ":100644 000000 $ZERO_OID $ZERO_OID D foo" >expect &&
|
|
git diff-tree $bogus_tree $EMPTY_TREE >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'raw diff shows null sha1 (modification)' '
|
|
echo ":100644 100644 $blob $ZERO_OID M foo" >expect &&
|
|
git diff-tree $good_tree $bogus_tree >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'raw diff shows null sha1 (other direction)' '
|
|
echo ":100644 100644 $ZERO_OID $blob M foo" >expect &&
|
|
git diff-tree $bogus_tree $good_tree >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'raw diff shows null sha1 (reverse)' '
|
|
echo ":100644 100644 $ZERO_OID $blob M foo" >expect &&
|
|
git diff-tree -R $good_tree $bogus_tree >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'raw diff shows null sha1 (index)' '
|
|
echo ":100644 100644 $ZERO_OID $blob M foo" >expect &&
|
|
git diff-index $bogus_tree >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'patch fails due to bogus sha1 (addition)' '
|
|
test_must_fail git diff-tree -p $EMPTY_TREE $bogus_tree
|
|
'
|
|
|
|
test_expect_success 'patch fails due to bogus sha1 (removal)' '
|
|
test_must_fail git diff-tree -p $bogus_tree $EMPTY_TREE
|
|
'
|
|
|
|
test_expect_success 'patch fails due to bogus sha1 (modification)' '
|
|
test_must_fail git diff-tree -p $good_tree $bogus_tree
|
|
'
|
|
|
|
test_expect_success 'patch fails due to bogus sha1 (other direction)' '
|
|
test_must_fail git diff-tree -p $bogus_tree $good_tree
|
|
'
|
|
|
|
test_expect_success 'patch fails due to bogus sha1 (reverse)' '
|
|
test_must_fail git diff-tree -R -p $good_tree $bogus_tree
|
|
'
|
|
|
|
test_expect_success 'patch fails due to bogus sha1 (index)' '
|
|
test_must_fail git diff-index -p $bogus_tree
|
|
'
|
|
|
|
test_done
|