Description
Compare one pathspec attribute requirement with supplied attribute state.
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.
Compare one pathspec attribute requirement with supplied attribute state.
When to use this tool
Use Git Path Spec Attribute State Token when inspecting the stated bounded Git or patch token.
How to use the tool and how it works
- Enter requirement, state, value. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read matches. Inspect matches before interpreting the associated values.
Compare one pathspec attribute requirement with supplied attribute state. Accept state set/unset/unspecified/value and requirement name, -name, !name or name=value; match the corresponding state and literal value.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| requirement | Requirement | Required. Text; maximum UTF-16 length 8192. |
| state | State | Required. Text; one of "set", "unset", "unspecified", "value"; maximum UTF-16 length 8192. |
| value | Value | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| matches | Matches | Required. Boolean. |
{
"input": {
"requirement": "!vendored",
"state": "unspecified",
"value": ""
},
"output": {
"matches": true
}
} Limitations and assumptions
- Attribute name is parsed but no file attributes are loaded; combined prefix/value forms are rejected.
- 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 Attribute Unset Vs Unspecified Token
Parse one Git attribute name and state token.
- Git Pathspec Magic Prefix Token
Split a long-form pathspec magic prefix from its pattern.