Skip to content

Commit

Permalink
Merge pull request #301 from jeschu1/add_config
Browse files Browse the repository at this point in the history
Set config to useHttpPath=true
  • Loading branch information
jeschu1 authored Oct 1, 2018
2 parents 7989320 + 9d6ec53 commit bc5da49
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions GVFS/GVFS.Common/Git/GitConfigSetting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class GitConfigSetting
{
public const string CoreVirtualizeObjectsName = "core.virtualizeobjects";
public const string CoreVirtualFileSystemName = "core.virtualfilesystem";
public const string CredentialUseHttpPath = "credential.useHttpPath";

public GitConfigSetting(string name, params string[] values)
{
Expand Down
2 changes: 1 addition & 1 deletion GVFS/GVFS.Common/Git/GitProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public virtual bool TryGetCredentials(
using (ITracer activity = tracer.StartActivity("TryGetCredentials", EventLevel.Informational))
{
Result gitCredentialOutput = this.InvokeGitAgainstDotGitFolder(
"credential fill",
"-c " + GitConfigSetting.CredentialUseHttpPath + "=true credential fill",
stdin => stdin.Write("url=" + repoUrl + "\n\n"),
parseStdOutLine: null);

Expand Down
2 changes: 1 addition & 1 deletion GVFS/GVFS.UnitTests/Git/GitAuthenticationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private MockGitProcess GetGitProcess()

int revocations = 0;
gitProcess.SetExpectedCommandResult(
"credential fill",
"-c credential.useHttpPath=true credential fill",
() => new GitProcess.Result("username=username\r\npassword=password" + revocations + "\r\n", string.Empty, GitProcess.Result.SuccessCode));

gitProcess.SetExpectedCommandResult(
Expand Down
1 change: 1 addition & 0 deletions GVFS/GVFS/CommandLine/GVFSVerb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public static bool TrySetRequiredGitConfigSettings(Enlistment enlistment)
{ GitConfigSetting.CoreVirtualizeObjectsName, "true" },
{ GitConfigSetting.CoreVirtualFileSystemName, Paths.ConvertPathToGitFormat(GVFSConstants.DotGit.Hooks.VirtualFileSystemPath) },
{ "core.hookspath", expectedHooksPath },
{ GitConfigSetting.CredentialUseHttpPath, "true" },
{ "credential.validate", "false" },
{ "diff.autoRefreshIndex", "false" },
{ "gc.auto", "0" },
Expand Down

0 comments on commit bc5da49

Please sign in to comment.