Public/Set-PrivateNamespace.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<#
    .SYNOPSIS
        Sets the private namespace, i.e. the prefix that should be applied to all of your private branches.
 
    .PARAMETER PrivateNamespace
        The namespace where all private branches will live in. E.g. private/
 
    .PARAMETER MyNamespace
        The namespace of the current user, e.g. private/das
#>

function Set-PrivateNamespace() {
    param(
        [Parameter(Mandatory,Position=0)]
        [string]$PrivateNamespace,
        [Parameter(Mandatory,Position=1)]
        [string]$MyNamespace
    )
    $script:PrivateNamespace = $PrivateNamespace.Trim('/') + '/'
    $script:MyNamespace = $MyNamespace.Trim('/') + '/'
}