Changeset
class Changeset extends AbstractObject implements IdAble
A comparison between two directories representing changes that can be applied.
Properties
| $lastQuery | from AbstractObject |
Methods
No description
Files and directories that were added in the newer directory.
Structured per-path diff statistics (kind and line counts) for this changeset.
Applies the diff represented by this changeset to a path on the host.
A unique identifier for this Changeset.
Returns true if the changeset is empty (i.e. there are no changes).
Files and directories that existed before and were updated in the newer directory.
Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
Force evaluation in the engine.
Add changes to an existing changeset
Add changes from multiple changesets using git octopus merge strategy
Details
in
AbstractObject at line 13
__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)
No description
in
AbstractObject at line 19
protected null|array|string|int|float|bool
queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)
No description
at line 19
array
addedPaths()
Files and directories that were added in the newer directory.
at line 28
Directory
after()
The newer/upper snapshot.
at line 37
File
asPatch()
Return a Git-compatible patch of the changes
at line 46
Directory
before()
The older/lower snapshot to compare against.
at line 55
array
diffStats()
Structured per-path diff statistics (kind and line counts) for this changeset.
at line 64
string
export(string $path)
Applies the diff represented by this changeset to a path on the host.
at line 74
AbstractId
id()
A unique identifier for this Changeset.
at line 83
bool
isEmpty()
Returns true if the changeset is empty (i.e. there are no changes).
at line 92
Directory
layer()
Return a snapshot containing only the created and modified files
at line 101
array
modifiedPaths()
Files and directories that existed before and were updated in the newer directory.
at line 110
array
removedPaths()
Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
at line 119
ChangesetId
sync()
Force evaluation in the engine.
at line 130
Changeset
withChangeset(Changeset $changes, ChangesetMergeConflict|null $onConflict = null)
Add changes to an existing changeset
By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
at line 149
Changeset
withChangesets(array $changes, ChangesetsMergeConflict|null $onConflict = null)
Add changes from multiple changesets using git octopus merge strategy
This is more efficient than chaining multiple withChangeset calls when merging many changesets.
Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).