gitgram/aitimemachine/git/t/t7525-status-rename.sh
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
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>
2026-06-23 14:14:09 +03:00

114 lines
2.8 KiB
Bash
Executable File

#!/bin/sh
test_description='git status rename detection options'
. ./test-lib.sh
test_expect_success 'setup' '
echo 1 >original &&
git add . &&
git commit -m"Adding original file." &&
mv original renamed &&
echo 2 >> renamed &&
git add . &&
cat >.gitignore <<-\EOF
.gitignore
expect*
actual*
EOF
'
test_expect_success 'status no-options' '
git status >actual &&
test_grep "renamed:" actual
'
test_expect_success 'status --no-renames' '
git status --no-renames >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'status.renames inherits from diff.renames false' '
git -c diff.renames=false status >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'status.renames inherits from diff.renames true' '
git -c diff.renames=true status >actual &&
test_grep "renamed:" actual
'
test_expect_success 'status.renames overrides diff.renames false' '
git -c diff.renames=true -c status.renames=false status >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'status.renames overrides from diff.renames true' '
git -c diff.renames=false -c status.renames=true status >actual &&
test_grep "renamed:" actual
'
test_expect_success 'status status.renames=false' '
git -c status.renames=false status >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'status status.renames=true' '
git -c status.renames=true status >actual &&
test_grep "renamed:" actual
'
test_expect_success 'commit honors status.renames=false' '
git -c status.renames=false commit --dry-run >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'commit honors status.renames=true' '
git -c status.renames=true commit --dry-run >actual &&
test_grep "renamed:" actual
'
test_expect_success 'status config overridden' '
git -c status.renames=true status --no-renames >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'status score=100%' '
git status -M=100% >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual &&
git status --find-renames=100% >actual &&
test_grep "deleted:" actual &&
test_grep "new file:" actual
'
test_expect_success 'status score=01%' '
git status -M=01% >actual &&
test_grep "renamed:" actual &&
git status --find-renames=01% >actual &&
test_grep "renamed:" actual
'
test_expect_success 'copies not overridden by find-renames' '
cp renamed copy &&
git add copy &&
git -c status.renames=copies status -M=01% >actual &&
test_grep "copied:" actual &&
test_grep "renamed:" actual &&
git -c status.renames=copies status --find-renames=01% >actual &&
test_grep "copied:" actual &&
test_grep "renamed:" actual
'
test_done