Git rename score
git-rename-score · version 1.0.0 · Developer tools · free, no key needed
Score Git-style line-chunk content similarity as an exact integer percentage with byte evidence.
Use when you need to: score git rename similarity · compare file content similarity · calculate rename percentage.
Decide before calling
Read the versioned contract and the supported scope below. Reuse git-rename-score@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-rename-score@1.0.0 for score git rename similarity. 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
- score git rename similarity
- compare file content similarity
- calculate rename percentage
- measure copied content bytes
- git diff similarity score
- estimate rename threshold match
Not supported
- run git diff
- compare file names
Behavior
- Models Git diffcore copied-byte scoring: identical newline-preserving byte chunks are counted as a multiset.
- Score is floor(100 * copied_bytes / max(source_bytes, destination_bytes)); two empty contents score 100.
- Text is encoded as UTF-8 without normalization; lone surrogates are rejected.
Input
source(string, required): max length 65536destination(string, required): max length 65536
Output
reference(constant "Git 2.51.0 diffcore-rename content similarity model", required)version(constant "1.0.0", required)score(integer, required): min 0; max 100copied_bytes(integer, required): min 0; max 65536source_bytes(integer, required): min 0; max 65536destination_bytes(integer, required): min 0; max 65536
Limits
- max content bytes: 65536
Example
Request input:
{
"source": "a\nb\n",
"destination": "a\nc\n"
}
Response:
{
"result": {
"reference": "Git 2.51.0 diffcore-rename content similarity model",
"version": "1.0.0",
"score": 50,
"copied_bytes": 2,
"source_bytes": 4,
"destination_bytes": 4
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "git-rename-score",
"version": "1.0.0",
"input": {
"source": "a\nb\n",
"destination": "a\nc\n"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/git-rename-score/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"source":"a\nb\n","destination":"a\nc\n"}'
The machine-readable contract is at /v1/tools/git-rename-score/versions/1.0.0.
CLI
node cli.mjs run git-rename-score 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Git copies detect: Detect deterministic Git-style copy pairs while allowing one source to match multiple destinations.
- Git renames detect: Detect deterministic one-to-one Git-style rename pairs, unmatched paths, scores, and byte evidence.
- Chmod mode convert: Convert a Unix permission mode and apply explicit chmod symbolic clauses, returning canonical octal and symbolic forms.
- Editorconfig resolve: Resolve EditorConfig properties for one normalized relative POSIX path from caller-supplied file contents.
- Har summarize: Summarize a HAR 1.2 JSON log into deterministic request, status, MIME, host, timing, size, and redaction counts.
- Commit conventional parse: Parse one Conventional Commits 1.0.0 message into its header, body, footers, and breaking-change status.