Public/Get-GitCommitRequired.ps1
function Get-GitCommitRequired { [CmdletBinding()] [OutputType([Boolean])] Param( [string]$state ) switch ($state) { "untracked_files" { $result = $true break } "changed_text" { $result = $true break } "changes_not_staged" { $result = $true break } "no_commits_yet" { $result = $false break } "working_tree_clean" { $result = $false break } "up_to_date" { break $result = $false } } return $result } |