Description
Parse a rename or copy status with similarity percent.
Git and diff tokens encode references, object metadata and patch coordinates. Parsing a local token does not resolve repository objects, establish identity or prove that a patch is complete or applicable.
Parse a rename or copy status with similarity percent.
When to use this tool
Use Git Diff Status Rename Percentage when inspecting the stated bounded Git or patch token.
How to use the tool and how it works
- Enter status. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read kind, similarity. Use the output convention below.
Parse a rename or copy status with similarity percent. Accept R or C followed by one to three digits in [0,100]; return kind and numeric similarity.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| status | Status | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| kind | Kind | Required. Text; maximum UTF-16 length 8192. |
| similarity | Similarity | Required. Safe integer. |
{
"input": {
"status": "R095"
},
"output": {
"kind": "rename",
"similarity": 95
}
} Limitations and assumptions
- Leading zeros are accepted; similarity is supplied metadata, not independently recomputed file resemblance.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use Git itself against the intended repository for object resolution, complete validation, history interpretation or patch application.
References
Similar or alternative tools
- Git Diff Hunk New Line Span
Return the new-side half-open span from a restricted diff hunk header.
- Git Diff Copy Similarity Score Token
Parse a literal similarity index percentage line.