branch
get
Read one branch summary by name.
strata branch getdb.branches.get(name: 'str') -> 'Any'wire branch_get
Reads the summary for one branch: name, deterministic branch id, generation, status, parent lineage, and logical creation version. A branch that does not exist is a `not_found.engine.branch` error, not an empty result.
Status commands return a scalar or compact status payload and do not mutate database state.
To see the complete help for this command, run:
strata branch get --helphelp(db.branches.get)
Example
Read one branch by name.
strata branch create featurestrata branch get feature
_ = db.branches.create("feature")db.branches.get("feature").name
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| branch | string | yes | Branch name. |
Returns
StatusResponse<BranchItem>
- dataBranchItem
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.branch_name | never | not_started |
| invalid_argument.engine.branch_name_reserved | never | not_started |