Skip to content

Commit

Permalink
Update help doc comments on Get-GitStatus
Browse files Browse the repository at this point in the history
Fix #657
  • Loading branch information
rkeithhill committed Apr 11, 2020
1 parent a160c9a commit 671c9e2
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions src/GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,34 @@ $castStringSeq = [Linq.Enumerable].GetMethod("Cast").MakeGenericMethod([string])

<#
.SYNOPSIS
Gets a Git status object that is used by Write-GitStatus.
Gets a Git status object that is used by `Write-GitStatus`.
.DESCRIPTION
Gets a Git status object that is used by Write-GitStatus.
The status object provides the information to be displayed in the various
sections of the posh-git prompt.
The `Get-GitStatus` cmdlet gets the status of the current Git repo.
The status object returned by this cmdlet provides the information
displayed in the various sections of the posh-git prompt. The following
settings in $GitPromptSettings controls what information is returned
in the status object:
$GitPromptSettings.EnableFileStatus
$GitPromptSettings.EnablePromptStatus
By default both settings are set to $true. You can disable the return of
file and/or prompt status information by setting one or both of these to
$false.
The `Force` parameter can be used to override these settings to ensure that
both file and prompt status information is returned in the status object.
.EXAMPLE
PS C:\> $s = Get-GitStatus; Write-GitStatus $s
Gets a Git status object. Then passes the object to Write-GitStatus which
writes out a posh-git prompt (or returns a string in ANSI mode) with the
information contained in the status object.
.EXAMPLE
PS C:\> $s = Get-GitStatus -Force
Gets a Git status object that always generates all status information even
if $GitPromptSettings has disabled `EnableFileStatus` and/or
`EnablePromptStatus`.
.INPUTS
None
.OUTPUTS
Expand Down

0 comments on commit 671c9e2

Please sign in to comment.