Types/LibGit2Sharp.Remote.Types.ps1xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<Types>
    <Type>
        <Name>LibGit2Sharp.Remote</Name>
        <Members>
            <ScriptProperty>
                <!-- The second-last part of the URL path -->
                <Name>Owner</Name>
                <GetScriptBlock>
                    $this.Url -match '([^/:]+)/[^/]+$' | Out-Null
                    return $Matches[1]
                </GetScriptBlock>
            </ScriptProperty>
            <ScriptProperty>
                <!-- The last path part of the URL path, without the .git extension -->
                <Name>RepositoryName</Name>
                <GetScriptBlock>
                    $this.Url -match '/([^/]+?)(\.git)?$' | Out-Null
                    return $Matches[1]
                </GetScriptBlock>
            </ScriptProperty>
            <ScriptProperty>
                <!-- The last path part of the URL path, without the .git extension -->
                <Name>Head</Name>
                <GetScriptBlock>
                    $this.Repository.Refs["refs/remotes/$($this.Name)/HEAD"]
                </GetScriptBlock>
            </ScriptProperty>
            <AliasProperty>
                <Name>DefaultBranch</Name>
                <ReferencedMemberName>Head</ReferencedMemberName>
            </AliasProperty>
            <MemberSet>
                <Name>PSStandardMembers</Name>
                <Members>
                    <PropertySet>
                        <Name>DefaultDisplayPropertySet</Name>
                        <ReferencedProperties>
                            <Name>Name</Name>
                            <Name>Url</Name>
                            <Name>Head</Name>
                            <Name>TagFetchMode</Name>
                        </ReferencedProperties>
                    </PropertySet>
                </Members>
            </MemberSet>
        </Members>
    </Type>
</Types>