Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 1.73 KB

File metadata and controls

58 lines (47 loc) · 1.73 KB
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 SyncExperimental

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)
Returns
Number

Apply.toTree AsyncExperimental

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

Apply.LOCATION ENUM

| Flag | Value | | --- | --- | --- | | Apply.LOCATION.WORKDIR | 0 | | Apply.LOCATION.INDEX | 1 | | Apply.LOCATION.BOTH | 2 |