createVersionFromCommit(
args
: {commit
:Pick
<LixCommit
,"id"
>;id?
:LixGenerated
<string
>;inheritsFrom?
:null
| {commit_id
:string
;hidden?
:LixGenerated
<undefined
|boolean
>;id
:LixGenerated
<string
>;inherits_from_version_id?
:null
|string
;name
:LixGenerated
<string
>;working_commit_id
:LixGenerated
<string
>; } |Pick
<{commit_id
:string
;hidden?
:LixGenerated
<undefined
|boolean
>;id
:LixGenerated
<string
>;inherits_from_version_id?
:null
|string
;name
:LixGenerated
<string
>;working_commit_id
:LixGenerated
<string
>; },"id"
>;lix
:Lix
;name?
:LixGenerated
<string
>; }):Promise
<{commit_id
:string
;hidden?
:LixGenerated
<undefined
|boolean
>;id
:LixGenerated
<string
>;inherits_from_version_id?
:null
|string
;name
:LixGenerated
<string
>;working_commit_id
:LixGenerated
<string
>; }>
Creates a new version that starts at a specific commit.
commit_id
to the provided commit.working_commit_id
that references an empty change set (global scope).inheritsFrom
and defaults to "global"
.Parameter | Type | Description |
---|---|---|
args | { commit : Pick <LixCommit , "id" >; id? : LixGenerated <string >; inheritsFrom? : null | { commit_id : string ; hidden? : LixGenerated <undefined | boolean >; id : LixGenerated <string >; inherits_from_version_id? : null | string ; name : LixGenerated <string >; working_commit_id : LixGenerated <string >; } | Pick <{ commit_id : string ; hidden? : LixGenerated <undefined | boolean >; id : LixGenerated <string >; inherits_from_version_id? : null | string ; name : LixGenerated <string >; working_commit_id : LixGenerated <string >; }, "id" >; lix : Lix ; name? : LixGenerated <string >; } | - |
args.commit | Pick <LixCommit , "id" > | The commit to branch from (only id is required). |
args.id? | LixGenerated <string > | Optional explicit version id. |
args.inheritsFrom? | null | { commit_id : string ; hidden? : LixGenerated <undefined | boolean >; id : LixGenerated <string >; inherits_from_version_id? : null | string ; name : LixGenerated <string >; working_commit_id : LixGenerated <string >; } | Pick <{ commit_id : string ; hidden? : LixGenerated <undefined | boolean >; id : LixGenerated <string >; inherits_from_version_id? : null | string ; name : LixGenerated <string >; working_commit_id : LixGenerated <string >; }, "id" > | Optional lineage: a parent version to inherit from, or null to disable; defaults to "global" . |
args.lix | Lix | The Lix instance. |
args.name? | LixGenerated <string > | Optional version name. |
Promise
<{ commit_id
: string
; hidden?
: LixGenerated
<undefined
| boolean
>; id
: LixGenerated
<string
>; inherits_from_version_id?
: null
| string
; name
: LixGenerated
<string
>; working_commit_id
: LixGenerated
<string
>; }>
If the provided commit id does not exist.