pub struct Hooks { /* private fields */ }

Implementations

source

pub fn run_post_rewrite_rebase(
    &self,
    repo: &Repository,
    changed_oids: &[(Oid, Oid)]
)

Run post-rewrite hook as if called by git rebase

The hook should be run after any automatic note copying (see “notes.rewrite.” in git-config(1)) has happened, and thus has access to these notes.

changed_shas (old, new):

  • For the squash and fixup operation, all commits that were squashed are listed as being rewritten to the squashed commit. This means that there will be several lines sharing the same new-sha1.
  • The commits are must be listed in the order that they were processed by rebase.
  • git doesn’t include entries for dropped commits

Run reference-transaction hook to signal that all reference updates have been queued to the transaction.

changed_refs (old, new, name):

  • name is the full name of the ref
  • old is zeroed out when force updating the reference regardless of its current value or when the reference is to be created anew

Run reference-transaction hook to signal that all reference updates have been queued to the transaction.

changed_refs (old, new, name):

  • name is the full name of the ref
  • old is zeroed out when force updating the reference regardless of its current value or when the reference is to be created anew

On success, call either

  • run_reference_transaction_committed
  • run_reference_transaction_aborted.

On failure, the transaction is considered aborted

Run reference-transaction hook to signal that all reference updates have been applied

changed_refs (old, new, name):

  • name is the full name of the ref
  • old is zeroed out when force updating the reference regardless of its current value or when the reference is to be created anew

Run reference-transaction hook to signal that no changes have been made

changed_refs (old, new, name):

  • name is the full name of the ref
  • old is zeroed out when force updating the reference regardless of its current value or when the reference is to be created anew

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.