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

Commit 3e520e9

Browse files
authored
Merge branch 'master' into fixes/1186-projection-buffers
2 parents fe4271c + d7db9e3 commit 3e520e9

File tree

5 files changed

+31
-6
lines changed

5 files changed

+31
-6
lines changed

src/GitHub.Api/WindowsLoginCache.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ public Task SaveLogin(string userName, string password, HostAddress hostAddress)
3939
Guard.ArgumentNotEmptyString(password, nameof(password));
4040
Guard.ArgumentNotNull(hostAddress, nameof(hostAddress));
4141

42+
var keyGit = GetKeyGit(hostAddress.CredentialCacheKeyHost);
4243
var keyHost = GetKeyHost(hostAddress.CredentialCacheKeyHost);
4344

45+
using (var credential = new Credential(userName, password, keyGit))
46+
{
47+
credential.Save();
48+
}
49+
4450
using (var credential = new Credential(userName, password, keyHost))
4551
{
4652
credential.Save();
@@ -54,8 +60,16 @@ public Task EraseLogin(HostAddress hostAddress)
5460
{
5561
Guard.ArgumentNotNull(hostAddress, nameof(hostAddress));
5662

63+
var keyGit = GetKeyGit(hostAddress.CredentialCacheKeyHost);
5764
var keyHost = GetKeyHost(hostAddress.CredentialCacheKeyHost);
5865

66+
using (var credential = new Credential())
67+
{
68+
credential.Target = keyGit;
69+
credential.Type = CredentialType.Generic;
70+
credential.Delete();
71+
}
72+
5973
using (var credential = new Credential())
6074
{
6175
credential.Target = keyHost;
@@ -66,6 +80,17 @@ public Task EraseLogin(HostAddress hostAddress)
6680
return Task.CompletedTask;
6781
}
6882

83+
static string GetKeyGit(string key)
84+
{
85+
key = FormatKey(key);
86+
// it appears this is how MS expects the host key
87+
if (!key.StartsWith("git:", StringComparison.Ordinal))
88+
key = "git:" + key;
89+
if (key.EndsWith("/", StringComparison.Ordinal))
90+
key = key.Substring(0, key.Length - 1);
91+
return key;
92+
}
93+
6994
static string GetKeyHost(string key)
7095
{
7196
key = FormatKey(key);

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<NuGetPackageImportStamp>
1212
</NuGetPackageImportStamp>
1313
<TargetFrameworkProfile />
14-
<ApplicationVersion>2.3.0.20</ApplicationVersion>
14+
<ApplicationVersion>2.3.0.22</ApplicationVersion>
1515
<OutputPath>..\..\build\$(Configuration)\</OutputPath>
1616
<VsixType>v3</VsixType>
1717
<IsProductComponent>false</IsProductComponent>

src/GitHub.VisualStudio/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="c3d3dc68-c977-411f-b3e8-03b0dccf7dfc" Version="2.3.0.20" Language="en-US" Publisher="GitHub, Inc" />
4+
<Identity Id="c3d3dc68-c977-411f-b3e8-03b0dccf7dfc" Version="2.3.0.22" Language="en-US" Publisher="GitHub, Inc" />
55
<DisplayName>GitHub Extension for Visual Studio</DisplayName>
66
<Description xml:space="preserve">A Visual Studio Extension that brings the GitHub Flow into Visual Studio.</Description>
77
<PackageId>GitHub.VisualStudio</PackageId>

src/MsiInstaller/Version.wxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Include>
3-
<?define VersionNumber="2.3.0.20" ?>
3+
<?define VersionNumber="2.3.0.22" ?>
44
</Include>

src/common/SolutionInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
using System.Runtime.InteropServices;
44

55
[assembly: AssemblyProduct("GitHub Extension for Visual Studio")]
6-
[assembly: AssemblyVersion("2.3.0.20")]
7-
[assembly: AssemblyFileVersion("2.3.0.20")]
6+
[assembly: AssemblyVersion("2.3.0.22")]
7+
[assembly: AssemblyFileVersion("2.3.0.22")]
88
[assembly: ComVisible(false)]
99
[assembly: AssemblyCompany("GitHub, Inc.")]
1010
[assembly: AssemblyCopyright("Copyright © GitHub, Inc. 2014-2016")]
@@ -16,6 +16,6 @@
1616
namespace System
1717
{
1818
internal static class AssemblyVersionInformation {
19-
internal const string Version = "2.3.0.20";
19+
internal const string Version = "2.3.0.22";
2020
}
2121
}

0 commit comments

Comments
 (0)