Private/Set-BareRepoGitConfig.ps1

<#
.SYNOPSIS
    Applies the recommended git config settings to a bare repository.
.DESCRIPTION
    Sets core.longpaths, push.autoSetupRemote, and fetch.prune. Extracted to
    avoid duplication between Invoke-GitCloneBare and Invoke-GitInit.
#>

function Set-BareRepoGitConfig {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]
        [string] $RepoPath
    )

    git -C $RepoPath config core.longpaths       true
    git -C $RepoPath config push.autoSetupRemote true
    git -C $RepoPath config fetch.prune          true
}