pub struct CheckoutBuilder<'cb> { /* private fields */ }
Expand description

A builder struct for configuring checkouts of a repository.

Implementations

Creates a new builder for checkouts with all of its default configuration.

Indicate that this checkout should perform a dry run by checking for conflicts but not make any actual changes.

Take any action necessary to get the working directory to match the target including potentially discarding modified files.

Indicate that the checkout should be performed safely, allowing new files to be created but not overwriting extisting files or changes.

This is the default.

In safe mode, create files that don’t exist.

Defaults to false.

In safe mode, apply safe file updates even when there are conflicts instead of canceling the checkout.

Defaults to false.

Remove untracked files from the working dir.

Defaults to false.

Remove ignored files from the working dir.

Defaults to false.

Only update the contents of files that already exist.

If set, files will not be created or deleted.

Defaults to false.

Prevents checkout from writing the updated files’ information to the index.

Defaults to true.

Indicate whether the index and git attributes should be refreshed from disk before any operations.

Defaults to true,

Skip files with unmerged index entries.

Defaults to false.

Indicate whether the checkout should proceed on conflicts by using the stage 2 version of the file (“ours”).

Defaults to false.

Indicate whether the checkout should proceed on conflicts by using the stage 3 version of the file (“theirs”).

Defaults to false.

Indicate whether ignored files should be overwritten during the checkout.

Defaults to true.

Indicate whether a normal merge file should be written for conflicts.

Defaults to false.

Specify for which notification types to invoke the notification callback.

Defaults to none.

Indicates whether to include common ancestor data in diff3 format files for conflicts.

Defaults to false.

Indicate whether to apply filters like CRLF conversion.

Set the mode with which new directories are created.

Default is 0755

Set the mode with which new files are created.

The default is 0644 or 0755 as dictated by the blob.

Add a path to be checked out.

If no paths are specified, then all files are checked out. Otherwise only these specified paths are checked out.

Set the directory to check out to

The name of the common ancestor side of conflicts

The name of the common our side of conflicts

The name of the common their side of conflicts

Set a callback to receive notifications of checkout progress.

Set a callback to receive checkout notifications.

Callbacks are invoked prior to modifying any files on disk. Returning false from the callback will cancel the checkout.

Configure a raw checkout options based on this configuration.

This method is unsafe as there is no guarantee that this structure will outlive the provided checkout options.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.