Git copies detect
git-copies-detect · version 1.0.0 · Developer tools · free, no key needed
Detect deterministic Git-style copy pairs while allowing one source to match multiple destinations.
Use when you need to: detect git copies · find copied file origins · match one source to many additions.
Decide before calling
Read the versioned contract and the supported scope below. Reuse git-copies-detect@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use git-copies-detect@1.0.0 for detect git copies. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- detect git copies
- find copied file origins
- match one source to many additions
- apply copy similarity cutoff
- resolve ambiguous copy sources
- report unmatched copy destinations
Not supported
- read a git repository
- perform a filesystem rename
Behavior
- Every candidate uses git-rename-score semantics and must meet the inclusive integer threshold.
- Each destination selects once; a source may be reused for multiple copies.
- Candidates sort by descending score, then source path, then destination path by Unicode scalar value; output pairs sort by destination then source.
Input
source_files(array of object, required): max items 64added_files(array of object, required): max items 64threshold(integer, required): min 0; max 100
Output
reference(constant "Git 2.51.0 diffcore-rename content similarity model", required)version(constant "1.0.0", required)threshold(integer, required): min 0; max 100pairs(array of object, required): max items 64unmatched_sources(array of string, required): max items 64unmatched_destinations(array of string, required): max items 64
Limits
- max content bytes: 65536
- max files per side: 64
- max comparisons: 4096
- max output bytes: 65536
Example
Request input:
{
"source_files": [
{
"path": "old",
"content": "a\n"
}
],
"added_files": [
{
"path": "new",
"content": "a\n"
}
],
"threshold": 50
}
Response:
{
"result": {
"reference": "Git 2.51.0 diffcore-rename content similarity model",
"version": "1.0.0",
"threshold": 50,
"pairs": [
{
"source_path": "old",
"destination_path": "new",
"score": 100,
"copied_bytes": 2
}
],
"unmatched_sources": [],
"unmatched_destinations": []
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "git-copies-detect",
"version": "1.0.0",
"input": {
"source_files": [
{
"path": "old",
"content": "a\n"
}
],
"added_files": [
{
"path": "new",
"content": "a\n"
}
],
"threshold": 50
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/git-copies-detect/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"source_files":[{"path":"old","content":"a\n"}],"added_files":[{"path":"new","content":"a\n"}],"threshold":50}'
The machine-readable contract is at /v1/tools/git-copies-detect/versions/1.0.0.
CLI
node cli.mjs run git-copies-detect 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Git renames detect: Detect deterministic one-to-one Git-style rename pairs, unmatched paths, scores, and byte evidence.
- Editorconfig resolve: Resolve EditorConfig properties for one normalized relative POSIX path from caller-supplied file contents.
- Git rename score: Score Git-style line-chunk content similarity as an exact integer percentage with byte evidence.
- Chmod mode convert: Convert a Unix permission mode and apply explicit chmod symbolic clauses, returning canonical octal and symbolic forms.
- Sql statements split: Split SQL text into exact statement spans with explicit PostgreSQL, MySQL, or SQLite lexical rules.
- Commit conventional parse: Parse one Conventional Commits 1.0.0 message into its header, body, footers, and breaking-change status.