Description
Parse a restricted ordinal Git reflog selector.
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 restricted ordinal Git reflog selector.
When to use this tool
Use Git Reflog Selector Token when inspecting the stated bounded Git or patch token.
How to use the tool and how it works
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read reference, ordinal. Use the output convention below.
Parse a restricted ordinal Git reflog selector. Accept a reference without whitespace, @ or braces followed by @{n}, where n is canonical decimal zero or a positive integer up to nine digits; return reference and ordinal.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Token | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| reference | Reference | Required. Text; maximum UTF-16 length 8192. |
| ordinal | Ordinal | Required. Safe integer. |
{
"input": {
"token": "HEAD@{3}"
},
"output": {
"reference": "HEAD",
"ordinal": 3
}
} Limitations and assumptions
- Timestamp selectors and actual reflog lookup are outside this parser.
- 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 Revision Parent Suffix Count
Parse one parent or generation suffix on a revision token.
- Development: Git Ref Short Name Prefix Split
Split a supported full Git ref into kind and short name.