layout
default
menu_item
api
title
Apply
description
Version 0.26.1
return_to
API Documentation Index
/api/
sections
apply
toTree
LOCATION
#apply
#toTree
#LOCATION
Apply. apply Sync Experimental
var result = Apply . apply ( repo , diff , location , options ) ;
Parameters
Type
repo
Repository
the repository to apply to
diff
Diff
the diff to apply
location
Number
the location to apply (workdir, index or both)
options
ApplyOptions
the options for the apply (or null for defaults)
Apply. toTree Async Experimental
Apply . toTree ( repo , preimage , diff , options ) . then ( function ( index ) {
// Use index
} ) ;
Parameters
Type
repo
Repository
the repository to apply
preimage
Tree
the tree to apply the diff to
diff
Diff
the diff to apply
options
ApplyOptions
the options for the apply (or null for defaults)
Returns
Index
the postimage of the application
| Flag | Value |
| --- | --- | --- |
| Apply.LOCATION. WORKDIR | 0 |
| Apply.LOCATION. INDEX | 1 |
| Apply.LOCATION. BOTH | 2 |