Method

FoundryGitCommitBuilderload_untracked_delta

unstable since: 1.1

Declaration [src]

DexFuture*
foundry_git_commit_builder_load_untracked_delta (
  FoundryGitCommitBuilder* self,
  GFile* file
)

Description [src]

Loads the delta for an untracked file. This creates a synthetic delta that represents adding the entire file, allowing the same API semantics for new files as for modified files. The delta can be used to toggle individual lines on/off for staging in the background.

The file must be untracked (not in git’s index) when the commit builder was created. Since untracked files are new files, the delta will contain a single hunk with all lines marked as additions.

Available since: 1.1

Parameters

file

Type: GFile

A GFile in the working tree.

The data is owned by the caller of the method.

Return value

Type: DexFuture

A DexFuture that resolves to a FoundryGitDelta or rejects with error.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.