Header menu logo Partas.GitNet

GitNetRuntime Type

Runtime for a GitNetConfig; contains resources that are repeatedly shared between functions. Not intended for side effects. Just to prevent boiler plate parameters being passed around.

Constructors

Constructor Description

GitNetRuntime(config)

Full Usage: GitNetRuntime(config)

Parameters:
Returns: GitNetRuntime
config : GitNetConfig
Returns: GitNetRuntime

Instance members

Instance member Description

this.CommitChanges

Full Usage: this.CommitChanges

Parameters:
    ?username : string - Git username
    ?email : string - Git email
    ?message : string - Message for commit
    ?date : DateTimeOffset - Date
    ?appendCommit : bool - Whether to append to last commit
    ?writeIndex : bool - Whether to write the index before committing. Default true

Commits staged files.

Pre GitNet 2.0.4, this would never raise an exception, and would instead log this to console and continue. This behaviour has been changed to raise an exception. Use TryCommitChanges if you want to catch the exception with a Result DU.

?username : string

Git username

?email : string

Git email

?message : string

Message for commit

?date : DateTimeOffset

Date

?appendCommit : bool

Whether to append to last commit

?writeIndex : bool

Whether to write the index before committing. Default true

this.CommitTags

Full Usage: this.CommitTags

Parameters:

Tags the current head of the repository with the given semvers.

Tags must still be pushed to the repository to have effect.

tags : SepochSemver seq

this.Disposals

Full Usage: this.Disposals

Returns: ResizeArray<(unit -> unit)>
Returns: ResizeArray<(unit -> unit)>

this.GetAssemblyFileStats

Full Usage: this.GetAssemblyFileStats

Returns: int
Returns: int

this.GetLastRun

Full Usage: this.GetLastRun

Returns: FrozenDictionary<string, GitNetTag voption>

A Run/DryRun computes the versions of scopes from the git history of commits and tags. This computes are cached and can be utilised by users.

Returns: FrozenDictionary<string, GitNetTag voption>

this.GetRuns

Full Usage: this.GetRuns

Returns: FrozenDictionary<string, GitNetTag voption> array

A Run/DryRun computes the versions of scopes from the git history of commits and tags. This computes are cached and can be utilised by users.

Returns: FrozenDictionary<string, GitNetTag voption> array

this.GetTagStats

Full Usage: this.GetTagStats

Returns: int
Returns: int

this.GetVersionFileStats

Full Usage: this.GetVersionFileStats

Returns: int
Returns: int

this.StageFiles

Full Usage: this.StageFiles

Parameters:
    files : string list -

Stages the given files for committing.

Pre GitNet 2.0.4, this would never raise an exception, and would instead log this to console and continue. This behaviour has been changed to raise an exception. Use TryStageFiles if you want to catch the exception

files : string list

this.TryCommitChanges

Full Usage: this.TryCommitChanges

Parameters:
    ?username : string - Git username
    ?email : string - Git email
    ?message : string - Message for commit
    ?date : DateTimeOffset - Date
    ?appendCommit : bool - Whether to append to last commit
    ?writeIndex : bool - Whether to write the index before committing. Default true

Returns: Result<unit, exn>

Commits staged files. Returns an error if the commit fails.

?username : string

Git username

?email : string

Git email

?message : string

Message for commit

?date : DateTimeOffset

Date

?appendCommit : bool

Whether to append to last commit

?writeIndex : bool

Whether to write the index before committing. Default true

Returns: Result<unit, exn>

this.TryCommitTags

Full Usage: this.TryCommitTags

Parameters:
Returns: Result<SepochSemver, (SepochSemver * exn)> list

Tags the current head of the repository with the given semvers.

Tags must still be pushed to the repository to have effect.

tags : SepochSemver seq

Returns: Result<SepochSemver, (SepochSemver * exn)> list

this.TryStageFiles

Full Usage: this.TryStageFiles

Parameters:
    files : string list -

Returns: Result<string list, Choice<(string * exn) list, exn>>

Stages the given files for committing. Returns an error if either one of the files fails to stage or the index cannot be written.

files : string list

Returns: Result<string list, Choice<(string * exn) list, exn>>

this.config

Full Usage: this.config

Returns: GitNetConfig
Returns: GitNetConfig

this.diff

Full Usage: this.diff

Returns: Diff
Returns: Diff

this.githubUrlFactory

Full Usage: this.githubUrlFactory

Returns: UrlFactory option
Returns: UrlFactory option

this.repo

Full Usage: this.repo

Returns: Repository
Returns: Repository

this.rootDir

Full Usage: this.rootDir

Returns: string
Returns: string

Type something to start searching.