Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d20497f

Browse files
authored
Merge branch 'master' into fixes/resizeable-peek-view
2 parents cbf709c + 36f265d commit d20497f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+132
-224
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Beta releases will have `(beta)` in their title in the gallery, following the ve
2222

2323
## Build requirements
2424

25-
* Visual Studio 2015
25+
* Visual Studio 2015+
2626
* Visual Studio SDK
2727

2828
## Build
@@ -37,7 +37,13 @@ git submodule deinit script
3737
git submodule update
3838
```
3939

40-
Open the `GitHubVS.sln` solution with Visual Studio 2015.
40+
Visual Studio extensions have to be signed, so you need to create a signing key with the name `publickey.snk` for your build in the root of the repository:
41+
42+
```txt
43+
sn -k `publickey.snk`
44+
```
45+
46+
Open the `GitHubVS.sln` solution with Visual Studio 2015+.
4147
To be able to use the GitHub API, you'll need to:
4248

4349
- [Register a new developer application](https://github.com/settings/developers) in your profile.

deploy-local.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
powershell.exe .\script\deploy.ps1 production None -Force -NoChat -NoPush -NoUpload
1+
powershell.exe .\script\deploy.ps1 -Force -NoChat -NoPush -NoUpload

deploy.cmd

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/Markdig.Wpf.Signed.0.2.1.nupkg

15 KB
Binary file not shown.

script

src/CredentialManagement/CredentialManagement.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
1616
<TargetFrameworkProfile />
17-
<BuildType Condition="Exists('..\..\script\src\ApiClientConfiguration_User.cs')">Internal</BuildType>
1817
<OutputPath>bin\$(Configuration)\</OutputPath>
1918
</PropertyGroup>
2019
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -32,11 +31,7 @@
3231
<ErrorReport>prompt</ErrorReport>
3332
<WarningLevel>4</WarningLevel>
3433
</PropertyGroup>
35-
<PropertyGroup Condition="$(Buildtype) == 'Internal'">
36-
<AssemblyOriginatorKeyFile>..\..\script\Key.snk</AssemblyOriginatorKeyFile>
37-
<SignAssembly>true</SignAssembly>
38-
<DelaySign>false</DelaySign>
39-
</PropertyGroup>
34+
<Import Project="$(SolutionDir)\src\common\signing.props" />
4035
<ItemGroup>
4136
<Reference Include="System" />
4237
<Reference Include="System.Core" />
@@ -48,9 +43,6 @@
4843
<Reference Include="System.Xml" />
4944
</ItemGroup>
5045
<ItemGroup>
51-
<None Include="..\..\script\Key.snk" Condition="$(Buildtype) == 'Internal'">
52-
<Link>Key.snk</Link>
53-
</None>
5446
<Compile Include="..\common\SolutionInfo.cs">
5547
<Link>Properties\SolutionInfo.cs</Link>
5648
</Compile>

src/GitHub.Api/GitHub.Api.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<AssemblyName>GitHub.Api</AssemblyName>
1212
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14-
<BuildType Condition="Exists('..\..\script\src\ApiClientConfiguration_User.cs')">Internal</BuildType>
1514
<OutputPath>bin\$(Configuration)\</OutputPath>
1615
<TargetFrameworkProfile />
1716
</PropertyGroup>
@@ -38,11 +37,7 @@
3837
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
3938
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
4039
</PropertyGroup>
41-
<PropertyGroup Condition="$(Buildtype) == 'Internal'">
42-
<AssemblyOriginatorKeyFile>..\..\script\Key.snk</AssemblyOriginatorKeyFile>
43-
<SignAssembly>true</SignAssembly>
44-
<DelaySign>false</DelaySign>
45-
</PropertyGroup>
40+
<Import Project="$(SolutionDir)\src\common\signing.props" />
4641
<ItemGroup>
4742
<Reference Include="System" />
4843
<Reference Include="System.ComponentModel.Composition" />
@@ -66,9 +61,6 @@
6661
<Compile Include="LoginManager.cs" />
6762
<Compile Include="SimpleCredentialStore.cs" />
6863
<Compile Include="WindowsLoginCache.cs" />
69-
<None Include="..\..\script\Key.snk" Condition="$(Buildtype) == 'Internal'">
70-
<Link>Key.snk</Link>
71-
</None>
7264
<Compile Include="Properties\AssemblyInfo.cs" />
7365
<Compile Include="..\common\SolutionInfo.cs">
7466
<Link>Properties\SolutionInfo.cs</Link>

src/GitHub.App/GitHub.App.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<RunCodeAnalysis>true</RunCodeAnalysis>
2020
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
2121
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
22-
<BuildType Condition="Exists('..\..\script\src\ApiClientConfiguration_User.cs')">Internal</BuildType>
2322
<OutputPath>bin\$(Configuration)\</OutputPath>
2423
<TargetFrameworkProfile />
2524
</PropertyGroup>
@@ -46,11 +45,7 @@
4645
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
4746
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
4847
</PropertyGroup>
49-
<PropertyGroup Condition="$(Buildtype) == 'Internal'">
50-
<AssemblyOriginatorKeyFile>..\..\script\Key.snk</AssemblyOriginatorKeyFile>
51-
<SignAssembly>true</SignAssembly>
52-
<DelaySign>false</DelaySign>
53-
</PropertyGroup>
48+
<Import Project="$(SolutionDir)\src\common\signing.props" />
5449
<ItemGroup>
5550
<Reference Include="LibGit2Sharp, Version=0.22.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
5651
<HintPath>..\..\packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.dll</HintPath>
@@ -136,9 +131,6 @@
136131
<Compile Include="Models\PullRequestReviewCommentModel.cs" />
137132
<Compile Include="Models\PullRequestDetailArgument.cs" />
138133
<Compile Include="ViewModels\ViewModelBase.cs" />
139-
<None Include="..\..\script\Key.snk" Condition="$(Buildtype) == 'Internal'">
140-
<Link>Key.snk</Link>
141-
</None>
142134
<Compile Include="Caches\CacheIndex.cs" />
143135
<Compile Include="Caches\CacheItem.cs" />
144136
<Compile Include="Caches\ImageCache.cs" />

src/GitHub.App/Services/GitClient.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,20 +191,27 @@ public Task<Patch> Compare(
191191
});
192192
}
193193

194-
public Task<ContentChanges> CompareWith(IRepository repository, string sha, string path, byte[] contents)
194+
public Task<ContentChanges> CompareWith(IRepository repository, string sha1, string sha2, string path, byte[] contents)
195195
{
196196
Guard.ArgumentNotNull(repository, nameof(repository));
197-
Guard.ArgumentNotEmptyString(sha, nameof(sha));
197+
Guard.ArgumentNotEmptyString(sha1, nameof(sha1));
198+
Guard.ArgumentNotEmptyString(sha2, nameof(sha1));
198199
Guard.ArgumentNotEmptyString(path, nameof(path));
199200

200201
return Task.Factory.StartNew(() =>
201202
{
202-
var commit = repository.Lookup<Commit>(sha);
203+
var commit1 = repository.Lookup<Commit>(sha1);
204+
var commit2 = repository.Lookup<Commit>(sha2);
205+
206+
var treeChanges = repository.Diff.Compare<TreeChanges>(commit1.Tree, commit2.Tree);
207+
var normalizedPath = path.Replace("/", "\\");
208+
var renamed = treeChanges.FirstOrDefault(x => x.Path == normalizedPath);
209+
var oldPath = renamed?.OldPath ?? path;
203210

204-
if (commit != null)
211+
if (commit1 != null)
205212
{
206213
var contentStream = contents != null ? new MemoryStream(contents) : new MemoryStream();
207-
var blob1 = commit[path]?.Target as Blob ?? repository.ObjectDatabase.CreateBlob(new MemoryStream());
214+
var blob1 = commit1[oldPath]?.Target as Blob ?? repository.ObjectDatabase.CreateBlob(new MemoryStream());
208215
var blob2 = repository.ObjectDatabase.CreateBlob(contentStream, path);
209216
return repository.Diff.Compare(blob1, blob2);
210217
}

src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<AssemblyName>GitHub.Exports.Reactive</AssemblyName>
1313
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
15-
<BuildType Condition="Exists('..\..\script\src\ApiClientConfiguration_User.cs')">Internal</BuildType>
1615
<NuGetPackageImportStamp>
1716
</NuGetPackageImportStamp>
1817
<OutputPath>bin\$(Configuration)\</OutputPath>
@@ -41,11 +40,7 @@
4140
<CodeAnalysisIgnoreGeneratedCode>true</CodeAnalysisIgnoreGeneratedCode>
4241
<CodeAnalysisRuleSet>..\common\GitHubVS.ruleset</CodeAnalysisRuleSet>
4342
</PropertyGroup>
44-
<PropertyGroup Condition="$(Buildtype) == 'Internal'">
45-
<AssemblyOriginatorKeyFile>..\..\script\Key.snk</AssemblyOriginatorKeyFile>
46-
<SignAssembly>true</SignAssembly>
47-
<DelaySign>false</DelaySign>
48-
</PropertyGroup>
43+
<Import Project="$(SolutionDir)\src\common\signing.props" />
4944
<ItemGroup>
5045
<Reference Include="LibGit2Sharp, Version=0.22.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
5146
<HintPath>..\..\packages\LibGit2Sharp.0.22.0\lib\net40\LibGit2Sharp.dll</HintPath>
@@ -143,9 +138,6 @@
143138
<Compile Include="ViewModels\IRepositoryForm.cs" />
144139
<Compile Include="ViewModels\IRepositoryPublishViewModel.cs" />
145140
<Compile Include="ViewModels\ITwoFactorDialogViewModel.cs" />
146-
<None Include="..\..\script\Key.snk" Condition="$(Buildtype) == 'Internal'">
147-
<Link>Key.snk</Link>
148-
</None>
149141
<Compile Include="Helpers\ExceptionHelper.cs" />
150142
<Compile Include="Models\GitIgnoreItem.cs" />
151143
<Compile Include="Models\LicenseItem.cs" />

0 commit comments

Comments
 (0)