From a8d87f349c92df62b51153e13054fc613dd334c1 Mon Sep 17 00:00:00 2001 From: J Wyman Date: Thu, 19 Jul 2018 00:14:33 -0400 Subject: [PATCH] cli: add GCM_OVERRIDE_URL support. Provide a mechanism for setting `TargetUri.ActualUri` via environment variables. - [x] Add `UrlOverride` property to `OperationArguments`. - [x] Add `UrlOverride` to the `KeyType` enumeration. - [x] Modify `OperationArguments` to use `UrlOverride` in its calculation of `TargetUri`. - [x] Add feature validation test. --- Cli/Manager/Program.cs | 32 +- Cli/Test/BasicLogonTests.cs | 122 + Cli/Test/Cli-Test.csproj | 1 + ...asicLogonTests_EnvironmentUrlOverride.json | 3554 +++++++++++++++++ Shared/Cli/Functions/Common.cs | 469 +-- Shared/Cli/OperationArguments.cs | 77 +- Shared/Cli/Program.cs | 32 +- 7 files changed, 4013 insertions(+), 274 deletions(-) create mode 100644 Cli/Test/BasicLogonTests.cs create mode 100644 Cli/Test/Data/BasicLogonTests_EnvironmentUrlOverride.json diff --git a/Cli/Manager/Program.cs b/Cli/Manager/Program.cs index a6d64d8..e510f5f 100644 --- a/Cli/Manager/Program.cs +++ b/Cli/Manager/Program.cs @@ -123,7 +123,7 @@ namespace Microsoft.Alm.Cli { _context.Trace.WriteLine($"converted '{url}' to '{uri.AbsoluteUri}'."); - OperationArguments operationArguments = new OperationArguments(_context); + var operationArguments = new OperationArguments(_context); operationArguments.SetTargetUri(uri); @@ -357,8 +357,12 @@ namespace Microsoft.Alm.Cli await LoadOperationArguments(operationArguments); EnableTraceLogging(operationArguments); - // Read the details of any git-remote-http(s).exe parent process. - ReadGitRemoteDetails(operationArguments); + // Read the details of any git-remote-http(s).exe parent process, but only if + // an override hasn't been set which would override the git-remote details. + if (string.IsNullOrEmpty(operationArguments.UrlOverride)) + { + ReadGitRemoteDetails(operationArguments); + } // Set the parent window handle. ParentHwnd = operationArguments.ParentHwnd; @@ -381,7 +385,7 @@ namespace Microsoft.Alm.Cli // see: https://www.kernel.org/pub/software/scm/git/docs/git-credential.html using (var stdin = InStream) { - OperationArguments operationArguments = new OperationArguments(_context); + var operationArguments = new OperationArguments(_context); Task.Run(async () => { @@ -397,8 +401,12 @@ namespace Microsoft.Alm.Cli await LoadOperationArguments(operationArguments); EnableTraceLogging(operationArguments); - // Read the details of any git-remote-http(s).exe parent process. - ReadGitRemoteDetails(operationArguments); + // Read the details of any git-remote-http(s).exe parent process, but only if + // an override hasn't been set which would override the git-remote details. + if (string.IsNullOrEmpty(operationArguments.UrlOverride)) + { + ReadGitRemoteDetails(operationArguments); + } // Set the parent window handle. ParentHwnd = operationArguments.ParentHwnd; @@ -433,7 +441,7 @@ namespace Microsoft.Alm.Cli { string doc = Path.Combine(installation.Doc, HelpFileName); - // if the help file exists, send it to the operating system to display to the user + // If the help file exists, send it to the operating system to display to the user. if (Storage.FileExists(doc)) { Trace.WriteLine($"opening help documentation '{doc}'."); @@ -467,7 +475,7 @@ namespace Microsoft.Alm.Cli // see: https://www.kernel.org/pub/software/scm/git/docs/git-credential.html using (var stdin = InStream) { - OperationArguments operationArguments = new OperationArguments(_context); + var operationArguments = new OperationArguments(_context); Task.Run(async () => { @@ -488,8 +496,12 @@ namespace Microsoft.Alm.Cli await LoadOperationArguments(operationArguments); EnableTraceLogging(operationArguments); - // Read the details of any git-remote-http(s).exe parent process. - ReadGitRemoteDetails(operationArguments); + // Read the details of any git-remote-http(s).exe parent process, but only if + // an override hasn't been set which would override the git-remote details. + if (string.IsNullOrEmpty(operationArguments.UrlOverride)) + { + ReadGitRemoteDetails(operationArguments); + } // Set the parent window handle. ParentHwnd = operationArguments.ParentHwnd; diff --git a/Cli/Test/BasicLogonTests.cs b/Cli/Test/BasicLogonTests.cs new file mode 100644 index 0000000..798cd19 --- /dev/null +++ b/Cli/Test/BasicLogonTests.cs @@ -0,0 +1,122 @@ +using System; +using System.IO; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Alm.Authentication; +using Xunit; +using static System.StringComparer; + +namespace Microsoft.Alm.Cli.Test +{ + public class BasicLogonTests : Authentication.Test.UnitTestBase + { + private static readonly Encoding Utf8 = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false); + + public BasicLogonTests(Xunit.Abstractions.ITestOutputHelper output) + : base(XunitHelper.Convert(output)) + { } + + [Fact] + public void EnvironmentUrlOverride() + { + const string protocol = "https"; + const string host = "microsoft-git-tools.visualstudio.com"; + const string urlOverride = protocol + "://github.com"; + + Environment.SetEnvironmentVariable("GCM_URL_OVERRIDE", urlOverride, EnvironmentVariableTarget.Process); + + InitializeTest(); + + var errorBuffer = new byte[4096]; + var outputBuffer = new byte[4096]; + var program = new Program(Context); + + using (var inputStream = new MemoryStream()) + using (var outputStream = new MemoryStream(outputBuffer)) + using (var errorStream = new MemoryStream(errorBuffer)) + using (var writer = new StreamWriter(inputStream, Utf8)) + { + SetupProgramStandardPipes(program, inputStream, outputStream, errorStream); + + MimicGitCredential(writer, protocol, host); + + inputStream.Seek(0, SeekOrigin.Begin); + + program._exit = (Program p, int exitcode, string message, string path, int line, string name) => + { + Assert.Same(program, p); + Assert.Equal(-1, exitcode); + Assert.Equal(Program.LogonFailedMessage, message, Ordinal); + }; + program._queryCredentials = (Program p, OperationArguments opArgs) => + { + Assert.Same(program, p); + Assert.NotNull(opArgs); + Assert.NotNull(opArgs.UrlOverride); + Assert.NotNull(opArgs.TargetUri); + + Assert.Equal(urlOverride, opArgs.UrlOverride, OrdinalIgnoreCase); + + var actualUrl = opArgs.TargetUri.ActualUri?.ToString()?.TrimEnd('/'); + var queryUrl = opArgs.TargetUri.QueryUri.ToString().TrimEnd('/'); + + Assert.Equal(urlOverride, actualUrl, OrdinalIgnoreCase); + Assert.Equal(protocol + "://" + host, queryUrl, OrdinalIgnoreCase); + + return Task.FromResult(null); + }; + + program.Get(); + } + } + + private static void MimicGitCredential(TextWriter writer, string protocol, string host) + { + writer.Write("protocol="); + writer.Write(protocol); + writer.Write("\n"); + writer.Write("host="); + writer.Write(host); + writer.Write("\n"); + writer.Write("\n"); + + writer.Flush(); + } + + private static void SetupProgramStandardPipes(Program program, Stream standardInput, Stream standardOutput, Stream standardError) + { + program._openStandardErrorStream = (Program p) => + { + Assert.Same(program, p); + + return standardError; + }; + program._openStandardInputStream = (Program p) => + { + Assert.Same(program, p); + + return standardInput; + }; + program._openStandardOutputStream = (Program p) => + { + Assert.Same(program, p); + + return standardOutput; + }; + program._write = (Program p, string message) => + { + Assert.Same(program, p); + + var buffer = Encoding.Unicode.GetBytes(message); + standardError.Write(buffer, 0, buffer.Length); + }; + program._writeLine = (Program p, string message) => + { + Assert.Same(program, p); + + var buffer = Encoding.Unicode.GetBytes(message + Environment.NewLine); + standardError.Write(buffer, 0, buffer.Length); + }; + } + } +} diff --git a/Cli/Test/Cli-Test.csproj b/Cli/Test/Cli-Test.csproj index 132f056..4918441 100644 --- a/Cli/Test/Cli-Test.csproj +++ b/Cli/Test/Cli-Test.csproj @@ -72,6 +72,7 @@ + diff --git a/Cli/Test/Data/BasicLogonTests_EnvironmentUrlOverride.json b/Cli/Test/Data/BasicLogonTests_EnvironmentUrlOverride.json new file mode 100644 index 0000000..d0d6a65 --- /dev/null +++ b/Cli/Test/Data/BasicLogonTests_EnvironmentUrlOverride.json @@ -0,0 +1,3554 @@ +/**** Git Process Management Library **** + * + * Copyright (c) Microsoft Corporation + * All rights reserved. + * + * MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +**/ + +// Use `Formatting.Indented` to ease review readability. +{ + "ExtendedData": [], + "DisplayName": "BasicLogonTests_EnvironmentUrlOverride", + "ResultPath": "C:\\Src\\Microsoft.Alm\\Gcm\\Cli\\Test\\Results", + "Services": { + "Network": { + "Operations": [] + }, + "Settings": { + "EnvironmentVariables": [ + { + "Target": 0, + "Values": [ + { + "Name": "GCM_DEBUG" + }, + { + "Name": "SystemDrive", + "Variable": "C:" + }, + { + "Name": "ProgramFiles(x86)", + "Variable": "C:\\Program Files (x86)" + }, + { + "Name": "ProgramW6432", + "Variable": "C:\\Program Files" + }, + { + "Name": "GIT_TRACE", + "Variable": "D:\\.trace\\git.log" + }, + { + "Name": "TMP", + "Variable": "C:\\Users\\Tester\\AppData\\Local\\Temp" + }, + { + "Name": "Path", + "Variable": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd" + }, + { + "Name": "USERPROFILE", + "Variable": "C:\\Users\\Tester" + }, + { + "Name": "TEMP", + "Variable": "C:\\Users\\Tester\\AppData\\Local\\Temp" + }, + { + "Name": "USERNAME", + "Variable": "Tester" + }, + { + "Name": "SystemRoot", + "Variable": "C:\\WINDOWS" + }, + { + "Name": "CommonProgramFiles", + "Variable": "C:\\Program Files (x86)\\Common File" + }, + { + "Name": "GCM_URL_OVERRIDE", + "Variable": "https://github.com" + }, + { + "Name": "ProgramData", + "Variable": "C:\\ProgramData" + }, + { + "Name": "HOMEPATH", + "Variable": "\\Users\\Tester" + }, + { + "Name": "ALLUSERSPROFILE", + "Variable": "C:\\ProgramData" + }, + { + "Name": "CommonProgramW6432", + "Variable": "C:\\Program Files\\Common Files" + }, + { + "Name": "HOMEDRIVE", + "Variable": "C:" + }, + { + "Name": "windir", + "Variable": "C:\\Windows" + }, + { + "Name": "ProgramFiles", + "Variable": "C:\\Program Files" + }, + { + "Name": "PATHEXT", + "Variable": ".COM;.EXE;.BAT;.CMD" + }, + { + "Name": "HOME", + "Variable": "C:\\Users\\Tester" + }, + { + "Name": "GCM_TRACE", + "Variable": "D:\\.trace\\git.log" + }, + { + "Name": "APPDATA", + "Variable": "C:\\Users\\Tester\\AppData\\Roaming" + }, + { + "Name": "LOCALAPPDATA", + "Variable": "C:\\Users\\Tester\\AppData\\Local" + }, + { + "Name": "CommonProgramFiles(x86)", + "Variable": "C:\\Program Files (x86)\\Common Files" + }, + { + "Name": "XDG_CONFIG_HOME" + } + ] + } + ], + "ExitCode": 0, + "ExpandVariables": [ + { + "Expanded": "C:\\Users\\Tester", + "Original": "C:\\Users\\Tester" + } + ], + "CurrentDirectory": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Is64BitOperatingSystem": true, + "NewLine": "\r\n", + "OsVersion": 0, + "SpecialFolders": [ + { + "Path": "C:\\ProgramData", + "SpecialFolder": 35 + }, + { + "Path": "C:\\Program Files (x86)", + "SpecialFolder": 42 + }, + { + "Path": "C:\\Program Files", + "SpecialFolder": 38 + }, + { + "Path": "C:\\Users\\Tester\\AppData\\Roaming", + "SpecialFolder": 26 + }, + { + "Path": "C:\\Users\\Tester\\AppData\\Local", + "SpecialFolder": 28 + } + ] + }, + "Storage": { + "Operations": [ + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Ordinal": 1, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Ordinal": 266, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Ordinal": 267, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Ordinal": 268, + "Output": true + } + ] + }, + { + "Method": "EnumerateFileSystemEntries", + "Queries": [ + { + "Input": { + "Options": 0, + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Pattern": "*" + }, + "Ordinal": 269, + "Output": [ + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Bitbucket.Authentication.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Bitbucket.Authentication.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Castle.Core.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Castle.Core.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.exe", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.exe.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.exe", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.exe.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.dll.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.dll.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.dll.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.dll.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.IdentityModel.Clients.ActiveDirectory.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.IdentityModel.Clients.ActiveDirectory.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Newtonsoft.Json.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Newtonsoft.Json.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.Threading.Tasks.Extensions.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.Threading.Tasks.Extensions.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.ValueTuple.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.ValueTuple.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.dll.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.pdb", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.abstractions.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.assert.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.assert.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.core.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.core.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.execution.desktop.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.execution.desktop.xml", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.json", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.reporters.net452.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.utility.net452.dll", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.visualstudio.testadapter.dll" + ] + } + ] + }, + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Ordinal": 323, + "Output": "Debug" + } + ] + }, + { + "Method": "GetParent", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug", + "Ordinal": 319, + "Output": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin" + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git", + "Ordinal": 228, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git", + "Ordinal": 231, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git", + "Ordinal": 233, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git", + "Ordinal": 235, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git", + "Ordinal": 240, + "Output": true + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git\\mingw64\\libexec\\git-core", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git\\mingw64\\libexec\\git-core", + "Ordinal": 229, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\mingw64\\libexec\\git-core", + "Ordinal": 236, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\mingw64\\libexec\\git-core", + "Ordinal": 241, + "Output": true + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git\\mingw32\\libexec\\git-core", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git\\mingw32\\libexec\\git-core", + "Ordinal": 232, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git\\libexec\\git-core", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git\\libexec\\git-core", + "Ordinal": 234, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Program Files (x86)\\Git", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Program Files (x86)\\Git", + "Ordinal": 238, + "Output": false + }, + { + "Input": "C:\\Program Files (x86)\\Git", + "Ordinal": 239, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Users\\Tester\\AppData\\Roaming\\Git", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Users\\Tester\\AppData\\Roaming\\Git", + "Ordinal": 243, + "Output": false + }, + { + "Input": "C:\\Users\\Tester\\AppData\\Roaming\\Git", + "Ordinal": 244, + "Output": false + }, + { + "Input": "C:\\Users\\Tester\\AppData\\Roaming\\Git", + "Ordinal": 245, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Users\\Tester\\AppData\\Local\\Git", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Users\\Tester\\AppData\\Local\\Git", + "Ordinal": 246, + "Output": false + }, + { + "Input": "C:\\Users\\Tester\\AppData\\Local\\Git", + "Ordinal": 247, + "Output": false + }, + { + "Input": "C:\\Users\\Tester\\AppData\\Local\\Git", + "Ordinal": 248, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\ProgramData\\Git", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\ProgramData\\Git", + "Ordinal": 249, + "Output": true + }, + { + "Input": "C:\\ProgramData\\Git", + "Ordinal": 251, + "Output": true + }, + { + "Input": "C:\\ProgramData\\Git", + "Ordinal": 253, + "Output": true + } + ] + } + ] + }, + { + "Path": "C:\\ProgramData\\Git\\mingw64\\libexec\\git-core", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\ProgramData\\Git\\mingw64\\libexec\\git-core", + "Ordinal": 250, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\ProgramData\\Git\\mingw32\\libexec\\git-core", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\ProgramData\\Git\\mingw32\\libexec\\git-core", + "Ordinal": 252, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\ProgramData\\Git\\libexec\\git-core", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\ProgramData\\Git\\libexec\\git-core", + "Ordinal": 254, + "Output": false + } + ] + } + ] + }, + { + "Path": "", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "", + "Ordinal": 259, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Users\\Tester", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Users\\Tester", + "Ordinal": 261, + "Output": true + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "Ordinal": 320, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "Ordinal": 321, + "Output": true + } + ] + }, + { + "Method": "EnumerateFileSystemEntries", + "Queries": [ + { + "Input": { + "Options": 0, + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "Pattern": "*" + }, + "Ordinal": 322, + "Output": [ + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug" + ] + } + ] + }, + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "Ordinal": 331, + "Output": "bin" + } + ] + }, + { + "Method": "GetParent", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "Ordinal": 324, + "Output": "C:\\Src\\MS.ALM.GCM\\Cli\\Test" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test", + "Ordinal": 325, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test", + "Ordinal": 326, + "Output": true + } + ] + }, + { + "Method": "EnumerateFileSystemEntries", + "Queries": [ + { + "Input": { + "Options": 0, + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test", + "Pattern": "*" + }, + "Ordinal": 327, + "Output": [ + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\app.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BasicAuthenticationTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BasicLogonTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BitbucketLogonTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Cli-Test.csproj", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Data", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\GithubLogonTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\GlobalSuppressions.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\obj", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\OperationArgumentsTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\packages.config", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\ProgramTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Properties", + "C:\\Src\\MS.ALM.GCM\\Result", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\VstsLogonTests.cs", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\XunitHelper.cs" + ] + } + ] + }, + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test", + "Ordinal": 351, + "Output": "Test" + } + ] + }, + { + "Method": "GetParent", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test", + "Ordinal": 345, + "Output": "C:\\Src\\MS.ALM.GCM\\Cli" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli", + "Ordinal": 346, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli", + "Ordinal": 347, + "Output": true + } + ] + }, + { + "Method": "EnumerateFileSystemEntries", + "Queries": [ + { + "Input": { + "Options": 0, + "Path": "C:\\Src\\MS.ALM.GCM\\Cli", + "Pattern": "*" + }, + "Ordinal": 348, + "Output": [ + "C:\\Src\\MS.ALM.GCM\\Cli\\Askpass", + "C:\\Src\\MS.ALM.GCM\\Cli\\Manager", + "C:\\Src\\MS.ALM.GCM\\Cli\\Test" + ] + } + ] + }, + { + "Method": "GetParent", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli", + "Ordinal": 352, + "Output": "C:\\Src\\MS.ALM.GCM" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM", + "Ordinal": 353, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM", + "Ordinal": 354, + "Output": true + } + ] + }, + { + "Method": "EnumerateFileSystemEntries", + "Queries": [ + { + "Input": { + "Options": 0, + "Path": "C:\\Src\\MS.ALM.GCM", + "Pattern": "*" + }, + "Ordinal": 355, + "Output": [ + "C:\\Src\\MS.ALM.GCM\\.git", + "C:\\Src\\MS.ALM.GCM\\.gitattributes", + "C:\\Src\\MS.ALM.GCM\\.gitignore", + "C:\\Src\\MS.ALM.GCM\\.vs", + "C:\\Src\\MS.ALM.GCM\\analysisRules.ruleset", + "C:\\Src\\MS.ALM.GCM\\appveyor.yml", + "C:\\Src\\MS.ALM.GCM\\Assets", + "C:\\Src\\MS.ALM.GCM\\Bitbucket.Authentication", + "C:\\Src\\MS.ALM.GCM\\build-docs.cmd", + "C:\\Src\\MS.ALM.GCM\\build.props", + "C:\\Src\\MS.ALM.GCM\\build.targets", + "C:\\Src\\MS.ALM.GCM\\Cli", + "C:\\Src\\MS.ALM.GCM\\CodeMaid.config", + "C:\\Src\\MS.ALM.GCM\\coverity.bat", + "C:\\Src\\MS.ALM.GCM\\Deploy", + "C:\\Src\\MS.ALM.GCM\\Docs", + "C:\\Src\\MS.ALM.GCM\\GcmParentWindowTest", + "C:\\Src\\MS.ALM.GCM\\GitCredentialManager.sln", + "C:\\Src\\MS.ALM.GCM\\GitHub.Authentication", + "C:\\Src\\MS.ALM.GCM\\Installer", + "C:\\Src\\MS.ALM.GCM\\LICENSE.txt", + "C:\\Src\\MS.ALM.GCM\\Microsoft.Alm.Authentication", + "C:\\Src\\MS.ALM.GCM\\packages", + "C:\\Src\\MS.ALM.GCM\\README.md", + "C:\\Src\\MS.ALM.GCM\\Shared", + "C:\\Src\\MS.ALM.GCM\\test.props", + "C:\\Src\\MS.ALM.GCM\\test.targets", + "C:\\Src\\MS.ALM.GCM\\VisualStudioTeamServices.Authentication", + "C:\\Src\\MS.ALM.GCM\\vsts-ci.yml", + "C:\\Src\\MS.ALM.GCM\\vsts-rs.yml", + "C:\\Src\\MS.ALM.GCM\\vsts-tt.yml", + "C:\\Src\\MS.ALM.GCM\\xunit.runner.json", + "C:\\Src\\MS.ALM.GCM\\_config.yml" + ] + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\.git", + "Methods": [ + { + "Method": "DirectoryExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git", + "Ordinal": 357, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git", + "Ordinal": 359, + "Output": true + } + ] + }, + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git", + "Ordinal": 356, + "Output": ".git" + } + ] + }, + { + "Method": "GetFullPath", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git", + "Ordinal": 358, + "Output": "C:\\Src\\MS.ALM.GCM\\.git" + } + ] + } + ] + }, + { + "Path": "C:\\ProgramData\\Git\\config", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\ProgramData\\Git\\config", + "Ordinal": 2, + "Output": true + }, + { + "Input": "C:\\ProgramData\\Git\\config", + "Ordinal": 3, + "Output": true + }, + { + "Input": "C:\\ProgramData\\Git\\config", + "Ordinal": 4, + "Output": true + } + ] + }, + { + "Method": "FileOpen", + "Queries": [ + { + "Input": { + "Access": 1, + "Mode": 3, + "Path": "C:\\ProgramData\\Git\\config", + "Share": 3 + }, + "Ordinal": 5, + "Output": { + "Access": 1, + "Data": [ + "W2NvcmVdCglzeW1saW5rcyA9IHRydWUKCWF1dG9jcmxmID0gZmFsc2UKCWZzY2FjaGUgPSB0cnVlCglmaWxlbW9kZSA9IGZhbHNlCltjb2xvcl0KCWRpZmYgPSBhdXRvCglzdGF0dXMgPSBhdXRvCglicmFuY2ggPSBhdXRvCglpbnRlcmFjdGl2ZSA9IHRydWUKW2hlbHBdCglmb3JtYXQgPSBodG1sCltodHRwXQpbZGlmZiAiYXN0ZXh0cGxhaW4iXQoJdGV4dGNvbnYgPSBhc3RleHRwbGFpbgpbcmViYXNlXQoJYXV0b3NxdWFzaCA9IHRydWUK", + "" + ] + } + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.COM", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.COM", + "Ordinal": 6, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.COM", + "Ordinal": 78, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.COM", + "Ordinal": 162, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.EXE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.EXE", + "Ordinal": 7, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.EXE", + "Ordinal": 79, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.EXE", + "Ordinal": 163, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.BAT", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.BAT", + "Ordinal": 8, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.BAT", + "Ordinal": 80, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.BAT", + "Ordinal": 164, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.CMD", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.CMD", + "Ordinal": 9, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.CMD", + "Ordinal": 81, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.CMD", + "Ordinal": 165, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.VBS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.VBS", + "Ordinal": 10, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.VBS", + "Ordinal": 82, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.VBS", + "Ordinal": 166, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.VBE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.VBE", + "Ordinal": 11, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.VBE", + "Ordinal": 83, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.VBE", + "Ordinal": 167, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.JS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.JS", + "Ordinal": 12, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.JS", + "Ordinal": 84, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.JS", + "Ordinal": 168, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.JSE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.JSE", + "Ordinal": 13, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.JSE", + "Ordinal": 85, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.JSE", + "Ordinal": 169, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.WSF", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.WSF", + "Ordinal": 14, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.WSF", + "Ordinal": 86, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.WSF", + "Ordinal": 170, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.WSH", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.WSH", + "Ordinal": 15, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.WSH", + "Ordinal": 87, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.WSH", + "Ordinal": 171, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.MSC", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.MSC", + "Ordinal": 16, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.MSC", + "Ordinal": 88, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.MSC", + "Ordinal": 172, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\system32\\Git.CPL", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\system32\\Git.CPL", + "Ordinal": 17, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.CPL", + "Ordinal": 89, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\system32\\Git.CPL", + "Ordinal": 173, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.COM", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.COM", + "Ordinal": 18, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.COM", + "Ordinal": 90, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.COM", + "Ordinal": 174, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.EXE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.EXE", + "Ordinal": 19, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.EXE", + "Ordinal": 91, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.EXE", + "Ordinal": 175, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.BAT", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.BAT", + "Ordinal": 20, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.BAT", + "Ordinal": 92, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.BAT", + "Ordinal": 176, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.CMD", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.CMD", + "Ordinal": 21, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.CMD", + "Ordinal": 93, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.CMD", + "Ordinal": 177, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.VBS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.VBS", + "Ordinal": 22, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.VBS", + "Ordinal": 94, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.VBS", + "Ordinal": 178, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.VBE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.VBE", + "Ordinal": 23, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.VBE", + "Ordinal": 95, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.VBE", + "Ordinal": 179, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.JS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.JS", + "Ordinal": 24, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.JS", + "Ordinal": 96, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.JS", + "Ordinal": 180, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.JSE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.JSE", + "Ordinal": 25, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.JSE", + "Ordinal": 97, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.JSE", + "Ordinal": 181, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.WSF", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.WSF", + "Ordinal": 26, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.WSF", + "Ordinal": 98, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.WSF", + "Ordinal": 182, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.WSH", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.WSH", + "Ordinal": 27, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.WSH", + "Ordinal": 99, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.WSH", + "Ordinal": 183, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.MSC", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.MSC", + "Ordinal": 28, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.MSC", + "Ordinal": 100, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.MSC", + "Ordinal": 184, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\Git.CPL", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\Git.CPL", + "Ordinal": 29, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.CPL", + "Ordinal": 101, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\Git.CPL", + "Ordinal": 185, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.COM", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.COM", + "Ordinal": 30, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.COM", + "Ordinal": 102, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.COM", + "Ordinal": 186, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.EXE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.EXE", + "Ordinal": 31, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.EXE", + "Ordinal": 103, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.EXE", + "Ordinal": 187, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.BAT", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.BAT", + "Ordinal": 32, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.BAT", + "Ordinal": 104, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.BAT", + "Ordinal": 188, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.CMD", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.CMD", + "Ordinal": 33, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.CMD", + "Ordinal": 105, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.CMD", + "Ordinal": 189, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.VBS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.VBS", + "Ordinal": 34, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.VBS", + "Ordinal": 106, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.VBS", + "Ordinal": 190, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.VBE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.VBE", + "Ordinal": 35, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.VBE", + "Ordinal": 107, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.VBE", + "Ordinal": 191, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.JS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.JS", + "Ordinal": 36, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.JS", + "Ordinal": 108, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.JS", + "Ordinal": 192, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.JSE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.JSE", + "Ordinal": 37, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.JSE", + "Ordinal": 109, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.JSE", + "Ordinal": 193, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.WSF", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.WSF", + "Ordinal": 38, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.WSF", + "Ordinal": 110, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.WSF", + "Ordinal": 194, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.WSH", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.WSH", + "Ordinal": 39, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.WSH", + "Ordinal": 111, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.WSH", + "Ordinal": 195, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.MSC", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.MSC", + "Ordinal": 40, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.MSC", + "Ordinal": 112, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.MSC", + "Ordinal": 196, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\Wbem\\Git.CPL", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\Wbem\\Git.CPL", + "Ordinal": 41, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.CPL", + "Ordinal": 113, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\Wbem\\Git.CPL", + "Ordinal": 197, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.COM", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.COM", + "Ordinal": 42, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.COM", + "Ordinal": 114, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.COM", + "Ordinal": 198, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.EXE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.EXE", + "Ordinal": 43, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.EXE", + "Ordinal": 115, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.EXE", + "Ordinal": 199, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.BAT", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.BAT", + "Ordinal": 44, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.BAT", + "Ordinal": 116, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.BAT", + "Ordinal": 200, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.CMD", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.CMD", + "Ordinal": 45, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.CMD", + "Ordinal": 117, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.CMD", + "Ordinal": 201, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.VBS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.VBS", + "Ordinal": 46, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.VBS", + "Ordinal": 118, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.VBS", + "Ordinal": 202, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.VBE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.VBE", + "Ordinal": 47, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.VBE", + "Ordinal": 119, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.VBE", + "Ordinal": 203, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.JS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.JS", + "Ordinal": 48, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.JS", + "Ordinal": 120, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.JS", + "Ordinal": 204, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.JSE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.JSE", + "Ordinal": 49, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.JSE", + "Ordinal": 121, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.JSE", + "Ordinal": 205, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.WSF", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.WSF", + "Ordinal": 50, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.WSF", + "Ordinal": 122, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.WSF", + "Ordinal": 206, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.WSH", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.WSH", + "Ordinal": 51, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.WSH", + "Ordinal": 123, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.WSH", + "Ordinal": 207, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.MSC", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.MSC", + "Ordinal": 52, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.MSC", + "Ordinal": 124, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.MSC", + "Ordinal": 208, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.CPL", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\Git.CPL", + "Ordinal": 53, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.CPL", + "Ordinal": 125, + "Output": false + }, + { + "Input": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\Git.CPL", + "Ordinal": 209, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.COM", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.COM", + "Ordinal": 210, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.EXE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.EXE", + "Ordinal": 211, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.BAT", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.BAT", + "Ordinal": 212, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.CMD", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.CMD", + "Ordinal": 213, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.VBS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.VBS", + "Ordinal": 214, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.VBE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.VBE", + "Ordinal": 215, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.JS", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.JS", + "Ordinal": 216, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.JSE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.JSE", + "Ordinal": 217, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.WSF", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.WSF", + "Ordinal": 218, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.WSH", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.WSH", + "Ordinal": 219, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.MSC", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.MSC", + "Ordinal": 220, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\WINDOWS\\System32\\OpenSSH\\Git.CPL", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\WINDOWS\\System32\\OpenSSH\\Git.CPL", + "Ordinal": 221, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git\\cmd\\Git.COM", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git\\cmd\\Git.COM", + "Ordinal": 222, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git\\cmd\\Git.EXE", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git\\cmd\\Git.EXE", + "Ordinal": 223, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\cmd\\git.exe", + "Ordinal": 230, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\cmd\\git.exe", + "Ordinal": 237, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\cmd\\git.exe", + "Ordinal": 242, + "Output": true + } + ] + } + ] + }, + { + "Path": "C:\\Program Files\\Git\\mingw64\\etc\\gitconfig", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Program Files\\Git\\mingw64\\etc\\gitconfig", + "Ordinal": 255, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\mingw64\\etc\\gitconfig", + "Ordinal": 256, + "Output": true + }, + { + "Input": "C:\\Program Files\\Git\\mingw64\\etc\\gitconfig", + "Ordinal": 257, + "Output": true + } + ] + }, + { + "Method": "FileOpen", + "Queries": [ + { + "Input": { + "Access": 1, + "Mode": 3, + "Path": "C:\\Program Files\\Git\\mingw64\\etc\\gitconfig", + "Share": 3 + }, + "Ordinal": 258, + "Output": { + "Access": 1, + "Data": [ + "W2h0dHBdCglzc2xCYWNrZW5kID0gc2NoYW5uZWwKW2RpZmYgImFzdGV4dHBsYWluIl0KCXRleHRjb252ID0gYXN0ZXh0cGxhaW4KW2ZpbHRlciAibGZzIl0KCWNsZWFuID0gZ2l0LWxmcyBjbGVhbiAtLSAlZgoJc211ZGdlID0gZ2l0LWxmcyBzbXVkZ2UgLS0gJWYKCXByb2Nlc3MgPSBnaXQtbGZzIGZpbHRlci1wcm9jZXNzCglyZXF1aXJlZCA9IHRydWUKW2NyZWRlbnRpYWxdCgloZWxwZXIgPSBtYW5hZ2VyCltjb3JlXQoJZWRpdG9yID0gJ0M6XFxQcm9ncmFtIEZpbGVzXFxOb3RlcGFkKytcXG5vdGVwYWQrKy5leGUnIC1tdWx0aUluc3QgLW5vdGFiYmFyIC1ub3Nlc3Npb24gLW5vUGx1Z2luCg==", + "" + ] + } + } + ] + } + ] + }, + { + "Path": "C:\\Users\\Tester\\AppData\\Roaming\\Git\\config", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Users\\Tester\\AppData\\Roaming\\Git\\config", + "Ordinal": 260, + "Output": false + } + ] + } + ] + }, + { + "Path": "C:\\Users\\Tester\\.gitconfig", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Users\\Tester\\.gitconfig", + "Ordinal": 262, + "Output": true + }, + { + "Input": "C:\\Users\\Tester\\.gitconfig", + "Ordinal": 263, + "Output": true + }, + { + "Input": "C:\\Users\\Tester\\.gitconfig", + "Ordinal": 264, + "Output": true + } + ] + }, + { + "Method": "FileOpen", + "Queries": [ + { + "Input": { + "Access": 1, + "Mode": 3, + "Path": "C:\\Users\\Tester\\.gitconfig", + "Share": 3 + }, + "Ordinal": 265, + "Output": { + "Access": 1, + "Data": [ + "W2JyYW5jaF0KCWF1dG9zZXR1cG1lcmdlID0gYWx3YXlzCglhdXRvc2V0dXByZWJhc2UgPSBhbHdheXMKW3VzZXJdCgluYW1lID0gSiBXeW1hbgoJZW1haWwgPSBqZXJlbXkud3ltYW5Ab3V0bG9vay5jb20KW2ZldGNoXQoJcHJ1bmUgPSB0cnVlCltwdXNoXQoJZGVmYXVsdCA9IHNpbXBsZQpbY3JlZGVudGlhbF0KCWhlbHBlciA9IG1hbmFnZXIKW2NvcmVdCgllZGl0b3IgPSBcIkM6L1Byb2dyYW0gRmlsZXMvTm90ZXBhZCsrL25vdGVwYWQrKy5leGVcIiAtbXVsdGlJbnN0IC1ub3Nlc3Npb24gLW5vUGx1Z2luICRACglwcmVsb2FkaW5kZXggPSB0cnVlCglmc2NhY2hlID0gdHJ1ZQoJYXNrcGFzcyA9IGFza3Bhc3MKW2FsaWFzXQoJYW1lbmQgPSAiIWYoKSB7IGdpdCBjb21taXQgLS1hbWVuZCAtLW5vLWVkaXQgLS1uby12ZXJpZnkgLS1zdGF0dXMgJEA7IH07IGYiCglkZXRhY2ggPSAiIWYoKSB7IGdpdCBjaGVja291dCAtLWRldGFjaCAkezE6LUhFQUR9OyB9OyBmIgoJZWRpdCA9ICIhZigpIHsgXCJDOi9Qcm9ncmFtIEZpbGVzL05vdGVwYWQrKy9ub3RlcGFkKysuZXhlXCIgLW11bHRpSW5zdCAtbm9zZXNzaW9uIC1ub1BsdWdpbiAkQDsgfTsgZiIKCWZvcmNlID0gIiFmKCkgeyBnaXQgcHVzaCAtLWZvcmNlLXdpdGgtbGVhc2U7IH07IGYiCglnZXQgPSAiIWYoKSB7IGdpdCBmZXRjaCAtbnAgJEA7IH07IGYiCglsb2dpID0gIiFmKCkgeyBnaXQgbG9nIC0tb25lbGluZSAtLWRlY29yYXRlIC0tZmlyc3QtcGFyZW50IC0zMCAkQDsgfTsgZiIKCWxvZ3ggPSAiIWYoKSB7IGdpdCBsb2cgLS1vbmVsaW5lIC0tZGVjb3JhdGUgLS1ncmFwaCAtMzAgJEA7IH07IGYiCgludWtlID0gIiFmKCkgeyBnaXQgY2xlYW4gLXhkZjsgZ2l0IHJlc2V0IC0taGFyZCBIRUFEOyB9OyBmIgoJcGljayA9ICIhZigpIHsgZ2l0IGNoZXJyeS1waWNrICRAOyB9OyBmIgoJcmVzYWZlID0gIiFmKCkgeyBnaXQgY29uZmlnIC0tZ2xvYmFsIC0tdW5zZXQgaHR0cC5wcm94eTsgZ2l0IGNvbmZpZyAtLWdsb2JhbCAtLXVuc2V0IGh0dHAuc3NsVg==", + "ZXJpZnk7IHByaW50ZiAndW5zYWZlIGluamVjdGlvbiAqZGlzYWJsZWQqIGZvciBGaWRkbGVyIHRyYWNpbmcuXG4nOyB9OyBmIgoJcm9vdCA9ICIhZigpIHsgZ2l0IHJldi1wYXJzZSAtLXNob3ctdG9wbGV2ZWw7IH07IGYiCglzd2VlcCA9ICIhZigpIHsgZ2l0IGJyYW5jaCAtLW1lcmdlZCAnJHskMTotb3JpZ2luL21hc3Rlcn0nIHwgeGFyZ3MgLW4gMSBnaXQgYnJhbmNoIC1EIDI+L2Rldi9udWxsOyB9OyBmIgoJc3luYyA9ICIhZigpIHsgZ2l0IGZldGNoIC0tYWxsOyBnaXQgc3dlZXA7IGdpdCBwdXNoIGRzdCBzcmMvbWFzdGVyOm1hc3RlcjsgfTsgZiIKCXVuc2FmZSA9ICIhZigpIHsgZ2l0IGNvbmZpZyAtLWdsb2JhbCBodHRwLnByb3h5IDEyNy4wLjAuMTo4ODg4OyBnaXQgY29uZmlnIC0tZ2xvYmFsIGh0dHAuc3NsVmVyaWZ5IGZhbHNlOyBwcmludGYgJ3Vuc2FmZSBpbmplY3Rpb24gKmVuYWJsZWQqIGZvciBGaWRkbGVyIHRyYWNpbmcuXG4nOyB9OyBmIgpbZ2NdCglhdXRvID0gNDA5NgpbZ2MgInJlZnMvcmVtb3Rlcy8qIl0KCXJlZmxvZ0V4cGlyZSA9IDcgZGF5cwoJcmVmbG9nRXhwaXJlVW5yZWFjaGFibGUgPSAyIGRheXMKW3N0YXR1c10KCXJlbGF0aXZlUGF0aHMgPSBmYWxzZQpbZmlsdGVyICJsZnMiXQoJY2xlYW4gPSBnaXQtbGZzIGNsZWFuICVmCglzbXVkZ2UgPSBnaXQtbGZzIHNtdWRnZSAlZgoJcmVxdWlyZWQgPSB0cnVlClttZXJnZXRvb2xdCglwcm9tcHQgPSBmYWxzZQpbZGlmZnRvb2wgImJjNCJdCgljbWQgPSBcIkM6L1Byb2dyYW0gRmlsZXMvQmV5b25kIENvbXBhcmUgNC9iY29tcC5leGVcIiBcIiRMT0NBTFwiIFwiJFJFTU9URVwiCltkaWZmXQoJdG9vbCA9IHZzZGlmZm1lcmdlClttZXJnZV0KCXRvb2wgPSBiYzQKW21lcmdldG9vbF0KCXByb21wdCA9IGZhbHNlClttZXJnZXRvb2wgImJjNCJdCgljbWQgPSBcIkM6L1Byb2dyYW0gRmlsZXMvQmV5b25kIENvbXBhcmUgNC9iY29tcC5leGVcIiBcIiRMT0NBTFwiIFwiJFJFTU9URVwiIFwiJEJBU0VcIiBcIiRNRVJHRURcIgoJdHJ1cw==", + "dEV4aXRDb2RlID0gdHJ1ZQpbZGlmZnRvb2xdCglwcm9tcHQgPSB0cnVlCltkaWZmdG9vbCAidnNkaWZmbWVyZ2UiXQoJY21kID0gXCJDOlxcUHJvZ3JhbSBGaWxlcyAoeDg2KVxcTWljcm9zb2Z0IFZpc3VhbCBTdHVkaW9cXDIwMTdcXENvbW11bml0eVxcQ29tbW9uN1xcSURFXFxDb21tb25FeHRlbnNpb25zXFxNaWNyb3NvZnRcXFRlYW1Gb3VuZGF0aW9uXFxUZWFtIEV4cGxvcmVyXFx2c2RpZmZtZXJnZS5leGVcIiBcIiRMT0NBTFwiIFwiJFJFTU9URVwiIC8vdAoJa2VlcEJhY2t1cCA9IGZhbHNlCltpbXBvcnRhbnRrZXldCltnaXR0ZXN0XQpbZ2l0dGVzdF0KW2dpdHRlc3RdCltpbXBvcnRhbnRrZXldCltnaXR0ZXN0XQpbZ2l0dGVzdF0KW2ltcG9ydGFudGtleV0KW2dpdHRlc3RdCltnaXR0ZXN0XQpbaW1wb3J0YW50a2V5XQpbZ2l0dGVzdF0KW2dpdHRlc3RdCltpbXBvcnRhbnRrZXldCltnaXR0ZXN0XQpbZ2l0dGVzdF0KW2ltcG9ydGFudGtleV0KW2dpdHRlc3RdCltnaXR0ZXN0XQpbaW1wb3J0YW50a2V5XQpbZ2l0dGVzdF0KW2dpdHRlc3RdCltpbXBvcnRhbnRrZXldCltnaXR0ZXN0XQpbZ2l0dGVzdF0KW2ltcG9ydGFudGtleV0KW2dpdHRlc3RdCltnaXR0ZXN0XQpbaW1wb3J0YW50a2V5XQpbZ2l0dGVzdF0KW2dpdHRlc3RdCltpbXBvcnRhbnRrZXldCltnaXR0ZXN0XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbY3JlZGVudGlhbCAiY29kZXguYXp1cmUuY29tIl0KCWF1dGhvcml0eSA9IEFBRApbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbaW1wb3J0YW50a2V5XQpbZ2l0dGVzdF0KW2ltcG9ydGFudGtleV0KW2dpdHRlc3RdCltnaXR0ZXN0XQpbaW1wb3J0YW50a2V5XQpbZ2l0dGVzdF0KW3dpblVwZGF0ZXJdCglyZWNlbnRseVNlZW5WZXJzaW9uID0gMi4xOC4wLndpbmRvd3MuMQo=", + "" + ] + } + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\.git\\config", + "Methods": [ + { + "Method": "FileExists", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git\\config", + "Ordinal": 360, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git\\config", + "Ordinal": 361, + "Output": true + }, + { + "Input": "C:\\Src\\MS.ALM.GCM\\.git\\config", + "Ordinal": 362, + "Output": true + } + ] + }, + { + "Method": "FileOpen", + "Queries": [ + { + "Input": { + "Access": 1, + "Mode": 3, + "Path": "C:\\Src\\MS.ALM.GCM\\.git\\config", + "Share": 3 + }, + "Ordinal": 363, + "Output": { + "Access": 1, + "Data": [ + "W2NvcmVdCglyZXBvc2l0b3J5Zm9ybWF0dmVyc2lvbiA9IDAKCWZpbGVtb2RlID0gZmFsc2UKCWJhcmUgPSBmYWxzZQoJbG9nYWxscmVmdXBkYXRlcyA9IHRydWUKCXN5bWxpbmtzID0gZmFsc2UKCWlnbm9yZWNhc2UgPSB0cnVlClthbGlhc10KCXN3ZWVwID0gIiFmKCkgeyBnaXQgYnJhbmNoIC0tbWVyZ2VkIHNyYy9tYXN0ZXIgfCB4YXJncyAtbiAxIGdpdCBicmFuY2ggLUQgMj4vZGV2L251bGw7IGdpdCBicmFuY2ggLS1saXN0IC1yIHNyYy9yZWxlYXNlcy9kZXYxNS4qdnMqIHwgeGFyZ3MgLW4gMSBnaXQgYnJhbmNoIC0tbWVyZ2VkIHwgeGFyZ3MgLW4gMSBnaXQgYnJhbmNoIC1EIDI+L2Rldi9udWxsOyB9OyBmIgoJc3luYyA9ICIhZigpIHsgZ2l0IGZldGNoIC0tYWxsOyBnaXQgcHVzaCBkc3Qgc3JjL21hc3RlcjptYXN0ZXI7IGdpdCBzd2VlcDsgfTsgZiIKW3JlbW90ZSAiZHN0Il0KCXVybCA9IGh0dHBzOi8vZ2l0aHViLmNvbS93aG9pc2ovR2l0LUNyZWRlbnRpYWwtTWFuYWdlci1mb3ItV2luZG93cy5naXQKCWZldGNoID0gK3JlZnMvaGVhZHMvKjpyZWZzL3JlbW90ZXMvZHN0LyoKW3JlbW90ZSAic3JjIl0KCXVybCA9IGh0dHBzOi8vZ2l0aHViLmNvbS9NaWNyb3NvZnQvR2l0LUNyZWRlbnRpYWwtTWFuYWdlci1mb3ItV2luZG93cy5naXQKCWZldGNoID0gK3JlZnMvaGVhZHMvKjpyZWZzL3JlbW90ZXMvc3JjLyoKW2JyYW5jaCAicmVsL3YxLjE3Il0KCXJlbW90ZSA9IHNyYwoJbWVyZ2UgPSByZWZzL2hlYWRzL3JlbC92MS4xNwoJcmViYXNlID0gdHJ1ZQpbYnJhbmNoICJ2MS4xNy9iZS1wYXRpZW50Il0KCXJlbW90ZSA9IGRzdAoJbWVyZ2UgPSByZWZzL2hlYWRzL3YxLjE3L2JlLXBhdGllbnQKCXJlYmFzZSA9IHRydWUKW2JyYW5jaCAiYWN0dWFsLXVybC1lbnYiXQoJcmVtb3RlID0gc3JjCgltZXJnZSA9IHJlZnMvaGVhZHMvbWFzdGVyCglyZWJhc2UgPSB0cnVlCg==", + "" + ] + } + } + ] + } + ] + }, + { + "Path": "reg:\\Registry32:LocalMachine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1\\InstallLocation", + "Methods": [ + { + "Method": "RegistryReadString", + "Queries": [ + { + "Input": { + "Hive": -2147483646, + "Name": "InstallLocation", + "Path": "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1", + "View": 512 + }, + "Ordinal": 224 + } + ] + } + ] + }, + { + "Path": "reg:\\Registry32:CurrentUser\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1\\InstallLocation", + "Methods": [ + { + "Method": "RegistryReadString", + "Queries": [ + { + "Input": { + "Hive": -2147483647, + "Name": "InstallLocation", + "Path": "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1", + "View": 512 + }, + "Ordinal": 225 + } + ] + } + ] + }, + { + "Path": "reg:\\Registry64:LocalMachine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1\\InstallLocation", + "Methods": [ + { + "Method": "RegistryReadString", + "Queries": [ + { + "Input": { + "Hive": -2147483646, + "Name": "InstallLocation", + "Path": "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1", + "View": 256 + }, + "Ordinal": 226, + "Output": "C:\\Program Files\\Git" + } + ] + } + ] + }, + { + "Path": "reg:\\Registry64:CurrentUser\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1\\InstallLocation", + "Methods": [ + { + "Method": "RegistryReadString", + "Queries": [ + { + "Input": { + "Hive": -2147483647, + "Name": "InstallLocation", + "Path": "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Git_is1", + "View": 256 + }, + "Ordinal": 227 + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Bitbucket.Authentication.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Bitbucket.Authentication.dll", + "Ordinal": 270, + "Output": "Bitbucket.Authentication.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Bitbucket.Authentication.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Bitbucket.Authentication.pdb", + "Ordinal": 271, + "Output": "Bitbucket.Authentication.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Castle.Core.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Castle.Core.dll", + "Ordinal": 272, + "Output": "Castle.Core.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Castle.Core.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Castle.Core.xml", + "Ordinal": 273, + "Output": "Castle.Core.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.exe", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.exe", + "Ordinal": 274, + "Output": "git-credential-manager.exe" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.exe.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.exe.config", + "Ordinal": 275, + "Output": "git-credential-manager.exe.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\git-credential-manager.pdb", + "Ordinal": 276, + "Output": "git-credential-manager.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.exe", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.exe", + "Ordinal": 277, + "Output": "GitHub.Authentication.exe" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.exe.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.exe.config", + "Ordinal": 278, + "Output": "GitHub.Authentication.exe.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.pdb", + "Ordinal": 279, + "Output": "GitHub.Authentication.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.dll", + "Ordinal": 280, + "Output": "GitHub.Authentication.Proxy.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.dll.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.dll.config", + "Ordinal": 281, + "Output": "GitHub.Authentication.Proxy.dll.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\GitHub.Authentication.Proxy.pdb", + "Ordinal": 282, + "Output": "GitHub.Authentication.Proxy.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.dll", + "Ordinal": 283, + "Output": "Microsoft.Alm.Authentication.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.dll.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.dll.config", + "Ordinal": 284, + "Output": "Microsoft.Alm.Authentication.dll.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.pdb", + "Ordinal": 285, + "Output": "Microsoft.Alm.Authentication.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.dll", + "Ordinal": 286, + "Output": "Microsoft.Alm.Authentication.Proxy.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.dll.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.dll.config", + "Ordinal": 287, + "Output": "Microsoft.Alm.Authentication.Proxy.dll.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Authentication.Proxy.pdb", + "Ordinal": 288, + "Output": "Microsoft.Alm.Authentication.Proxy.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.dll", + "Ordinal": 289, + "Output": "Microsoft.Alm.Cli.Test.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.dll.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.dll.config", + "Ordinal": 290, + "Output": "Microsoft.Alm.Cli.Test.dll.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.Alm.Cli.Test.pdb", + "Ordinal": 291, + "Output": "Microsoft.Alm.Cli.Test.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.IdentityModel.Clients.ActiveDirectory.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.IdentityModel.Clients.ActiveDirectory.dll", + "Ordinal": 292, + "Output": "Microsoft.IdentityModel.Clients.ActiveDirectory.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.IdentityModel.Clients.ActiveDirectory.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Microsoft.IdentityModel.Clients.ActiveDirectory.xml", + "Ordinal": 293, + "Output": "Microsoft.IdentityModel.Clients.ActiveDirectory.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.dll", + "Ordinal": 294, + "Output": "Moq.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.pdb", + "Ordinal": 295, + "Output": "Moq.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Moq.xml", + "Ordinal": 296, + "Output": "Moq.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Newtonsoft.Json.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Newtonsoft.Json.dll", + "Ordinal": 297, + "Output": "Newtonsoft.Json.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Newtonsoft.Json.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\Newtonsoft.Json.xml", + "Ordinal": 298, + "Output": "Newtonsoft.Json.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.Threading.Tasks.Extensions.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.Threading.Tasks.Extensions.dll", + "Ordinal": 299, + "Output": "System.Threading.Tasks.Extensions.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.Threading.Tasks.Extensions.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.Threading.Tasks.Extensions.xml", + "Ordinal": 300, + "Output": "System.Threading.Tasks.Extensions.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.ValueTuple.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.ValueTuple.dll", + "Ordinal": 301, + "Output": "System.ValueTuple.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.ValueTuple.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\System.ValueTuple.xml", + "Ordinal": 302, + "Output": "System.ValueTuple.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.dll", + "Ordinal": 303, + "Output": "VisualStudioTeamServices.Authentication.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.pdb", + "Ordinal": 304, + "Output": "VisualStudioTeamServices.Authentication.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.dll", + "Ordinal": 305, + "Output": "VisualStudioTeamServices.Authentication.Proxy.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.dll.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.dll.config", + "Ordinal": 306, + "Output": "VisualStudioTeamServices.Authentication.Proxy.dll.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.pdb", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\VisualStudioTeamServices.Authentication.Proxy.pdb", + "Ordinal": 307, + "Output": "VisualStudioTeamServices.Authentication.Proxy.pdb" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.abstractions.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.abstractions.dll", + "Ordinal": 308, + "Output": "xunit.abstractions.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.assert.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.assert.dll", + "Ordinal": 309, + "Output": "xunit.assert.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.assert.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.assert.xml", + "Ordinal": 310, + "Output": "xunit.assert.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.core.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.core.dll", + "Ordinal": 311, + "Output": "xunit.core.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.core.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.core.xml", + "Ordinal": 312, + "Output": "xunit.core.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.execution.desktop.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.execution.desktop.dll", + "Ordinal": 313, + "Output": "xunit.execution.desktop.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.execution.desktop.xml", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.execution.desktop.xml", + "Ordinal": 314, + "Output": "xunit.execution.desktop.xml" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.json", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.json", + "Ordinal": 315, + "Output": "xunit.runner.json" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.reporters.net452.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.reporters.net452.dll", + "Ordinal": 316, + "Output": "xunit.runner.reporters.net452.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.utility.net452.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.utility.net452.dll", + "Ordinal": 317, + "Output": "xunit.runner.utility.net452.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.visualstudio.testadapter.dll", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\bin\\Debug\\xunit.runner.visualstudio.testadapter.dll", + "Ordinal": 318, + "Output": "xunit.runner.visualstudio.testadapter.dll" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\app.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\app.config", + "Ordinal": 328, + "Output": "app.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BasicAuthenticationTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BasicAuthenticationTests.cs", + "Ordinal": 329, + "Output": "BasicAuthenticationTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BasicLogonTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BasicLogonTests.cs", + "Ordinal": 330, + "Output": "BasicLogonTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BitbucketLogonTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\BitbucketLogonTests.cs", + "Ordinal": 332, + "Output": "BitbucketLogonTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Cli-Test.csproj", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Cli-Test.csproj", + "Ordinal": 333, + "Output": "Cli-Test.csproj" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Data", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Data", + "Ordinal": 334, + "Output": "Data" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\GithubLogonTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\GithubLogonTests.cs", + "Ordinal": 335, + "Output": "GithubLogonTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\GlobalSuppressions.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\GlobalSuppressions.cs", + "Ordinal": 336, + "Output": "GlobalSuppressions.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\obj", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\obj", + "Ordinal": 337, + "Output": "obj" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\OperationArgumentsTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\OperationArgumentsTests.cs", + "Ordinal": 338, + "Output": "OperationArgumentsTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\packages.config", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\packages.config", + "Ordinal": 339, + "Output": "packages.config" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\ProgramTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\ProgramTests.cs", + "Ordinal": 340, + "Output": "ProgramTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Properties", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\Properties", + "Ordinal": 341, + "Output": "Properties" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Result", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Result", + "Ordinal": 342, + "Output": "Results" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\VstsLogonTests.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\VstsLogonTests.cs", + "Ordinal": 343, + "Output": "VstsLogonTests.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\XunitHelper.cs", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Test\\XunitHelper.cs", + "Ordinal": 344, + "Output": "XunitHelper.cs" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Askpass", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Askpass", + "Ordinal": 349, + "Output": "Askpass" + } + ] + } + ] + }, + { + "Path": "C:\\Src\\MS.ALM.GCM\\Cli\\Manager", + "Methods": [ + { + "Method": "GetFileName", + "Queries": [ + { + "Input": "C:\\Src\\MS.ALM.GCM\\Cli\\Manager", + "Ordinal": 350, + "Output": "Manager" + } + ] + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/Shared/Cli/Functions/Common.cs b/Shared/Cli/Functions/Common.cs index 0da8c2a..3f81114 100644 --- a/Shared/Cli/Functions/Common.cs +++ b/Shared/Cli/Functions/Common.cs @@ -82,125 +82,125 @@ namespace Microsoft.Alm.Cli switch (operationArguments.Authority) { case AuthorityType.Auto: - program.Trace.WriteLine($"detecting authority type for '{operationArguments.TargetUri}'."); + program.Trace.WriteLine($"detecting authority type for '{operationArguments.TargetUri}'."); - // Detect the authority. - authority = await Vsts.Authentication.GetAuthentication(program.Context, - operationArguments.TargetUri, - Program.VstsCredentialScope, - new SecretStore(program.Context, secretsNamespace, Vsts.Authentication.UriNameConversion)) - ?? Github.Authentication.GetAuthentication(program.Context, + // Detect the authority. + authority = await Vsts.Authentication.GetAuthentication(program.Context, operationArguments.TargetUri, - Program.GitHubCredentialScope, - new SecretStore(program.Context, secretsNamespace, Secret.UriToName), - githubCredentialCallback, - githubAuthcodeCallback, - null) - ?? Bitbucket.Authentication.GetAuthentication(program.Context, - operationArguments.TargetUri, - new SecretStore(program.Context, secretsNamespace, Secret.UriToIdentityUrl), - bitbucketCredentialCallback, - bitbucketOauthCallback); + Program.VstsCredentialScope, + new SecretStore(program.Context, secretsNamespace, Vsts.Authentication.UriNameConversion)) + ?? Github.Authentication.GetAuthentication(program.Context, + operationArguments.TargetUri, + Program.GitHubCredentialScope, + new SecretStore(program.Context, secretsNamespace, Secret.UriToName), + githubCredentialCallback, + githubAuthcodeCallback, + null) + ?? Bitbucket.Authentication.GetAuthentication(program.Context, + operationArguments.TargetUri, + new SecretStore(program.Context, secretsNamespace, Secret.UriToIdentityUrl), + bitbucketCredentialCallback, + bitbucketOauthCallback); - if (authority != null) + if (authority != null) + { + // Set the authority type based on the returned value. + if (authority is Vsts.MsaAuthentication) { - // Set the authority type based on the returned value. - if (authority is Vsts.MsaAuthentication) - { - operationArguments.Authority = AuthorityType.MicrosoftAccount; - goto case AuthorityType.MicrosoftAccount; - } - else if (authority is Vsts.AadAuthentication) - { - operationArguments.Authority = AuthorityType.AzureDirectory; - goto case AuthorityType.AzureDirectory; - } - else if (authority is Github.Authentication) - { - operationArguments.Authority = AuthorityType.GitHub; - goto case AuthorityType.GitHub; - } - else if (authority is Bitbucket.Authentication) - { - operationArguments.Authority = AuthorityType.Bitbucket; - goto case AuthorityType.Bitbucket; - } + operationArguments.Authority = AuthorityType.MicrosoftAccount; + goto case AuthorityType.MicrosoftAccount; } - goto default; + else if (authority is Vsts.AadAuthentication) + { + operationArguments.Authority = AuthorityType.AzureDirectory; + goto case AuthorityType.AzureDirectory; + } + else if (authority is Github.Authentication) + { + operationArguments.Authority = AuthorityType.GitHub; + goto case AuthorityType.GitHub; + } + else if (authority is Bitbucket.Authentication) + { + operationArguments.Authority = AuthorityType.Bitbucket; + goto case AuthorityType.Bitbucket; + } + } + goto default; case AuthorityType.AzureDirectory: - program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is Azure Directory."); + program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is Azure Directory."); - if (authority is null) + if (authority is null) + { + Guid tenantId = Guid.Empty; + + // Get the identity of the tenant. + var result = await Vsts.Authentication.DetectAuthority(program.Context, operationArguments.TargetUri); + + if (result.HasValue) { - Guid tenantId = Guid.Empty; - - // Get the identity of the tenant. - var result = await Vsts.Authentication.DetectAuthority(program.Context, operationArguments.TargetUri); - - if (result.HasValue) - { - tenantId = result.Value; - } - - // Create the authority object. - authority = new Vsts.AadAuthentication(program.Context, - tenantId, - operationArguments.VstsTokenScope, - new SecretStore(program.Context, secretsNamespace, Vsts.AadAuthentication.UriNameConversion)); + tenantId = result.Value; } - // Return the allocated authority or a generic AAD backed VSTS authentication object. - return authority; + // Create the authority object. + authority = new Vsts.AadAuthentication(program.Context, + tenantId, + operationArguments.VstsTokenScope, + new SecretStore(program.Context, secretsNamespace, Vsts.AadAuthentication.UriNameConversion)); + } + + // Return the allocated authority or a generic AAD backed VSTS authentication object. + return authority; case AuthorityType.Basic: - // Enforce basic authentication only. - basicNtlmSupport = NtlmSupport.Never; - goto default; + // Enforce basic authentication only. + basicNtlmSupport = NtlmSupport.Never; + goto default; case AuthorityType.GitHub: - program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is GitHub."); + program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is GitHub."); - // Return a GitHub authentication object. - return authority ?? new Github.Authentication(program.Context, - operationArguments.TargetUri, - Program.GitHubCredentialScope, - new SecretStore(program.Context, secretsNamespace, Secret.UriToName), - githubCredentialCallback, - githubAuthcodeCallback, - null); + // Return a GitHub authentication object. + return authority ?? new Github.Authentication(program.Context, + operationArguments.TargetUri, + Program.GitHubCredentialScope, + new SecretStore(program.Context, secretsNamespace, Secret.UriToName), + githubCredentialCallback, + githubAuthcodeCallback, + null); case AuthorityType.Bitbucket: - program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is Bitbucket."); + program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is Bitbucket."); - // Return a Bitbucket authentication object. - return authority ?? new Bitbucket.Authentication(program.Context, - new SecretStore(program.Context, secretsNamespace, Secret.UriToIdentityUrl), - bitbucketCredentialCallback, - bitbucketOauthCallback); + // Return a Bitbucket authentication object. + return authority ?? new Bitbucket.Authentication(program.Context, + new SecretStore(program.Context, secretsNamespace, Secret.UriToIdentityUrl), + bitbucketCredentialCallback, + bitbucketOauthCallback); case AuthorityType.MicrosoftAccount: - program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is Microsoft Live."); + program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is Microsoft Live."); - // Return the allocated authority or a generic MSA backed VSTS authentication object. - return authority ?? new Vsts.MsaAuthentication(program.Context, - operationArguments.VstsTokenScope, - new SecretStore(program.Context, secretsNamespace, Vsts.MsaAuthentication.UriNameConversion)); + // Return the allocated authority or a generic MSA backed VSTS authentication object. + return authority ?? new Vsts.MsaAuthentication(program.Context, + operationArguments.VstsTokenScope, + new SecretStore(program.Context, secretsNamespace, Vsts.MsaAuthentication.UriNameConversion)); case AuthorityType.Ntlm: - // Enforce NTLM authentication only. - basicNtlmSupport = NtlmSupport.Always; - goto default; + // Enforce NTLM authentication only. + basicNtlmSupport = NtlmSupport.Always; + goto default; default: - program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is basic with NTLM={basicNtlmSupport}."); + program.Trace.WriteLine($"authority for '{operationArguments.TargetUri}' is basic with NTLM={basicNtlmSupport}."); - // Return a generic username + password authentication object. - return authority ?? new BasicAuthentication(program.Context, - new SecretStore(program.Context, secretsNamespace, Secret.UriToIdentityUrl), - basicNtlmSupport, - basicCredentialCallback, - null); + // Return a generic username + password authentication object. + return authority ?? new BasicAuthentication(program.Context, + new SecretStore(program.Context, secretsNamespace, Secret.UriToIdentityUrl), + basicNtlmSupport, + basicCredentialCallback, + null); } } @@ -217,24 +217,24 @@ namespace Microsoft.Alm.Cli { default: case AuthorityType.Basic: - program.Trace.WriteLine($"deleting basic credentials for '{operationArguments.TargetUri}'."); - return await authentication.DeleteCredentials(operationArguments.TargetUri); + program.Trace.WriteLine($"deleting basic credentials for '{operationArguments.TargetUri}'."); + return await authentication.DeleteCredentials(operationArguments.TargetUri); case AuthorityType.AzureDirectory: case AuthorityType.MicrosoftAccount: - program.Trace.WriteLine($"deleting VSTS credentials for '{operationArguments.TargetUri}'."); - var vstsAuth = authentication as Vsts.Authentication; - return await vstsAuth.DeleteCredentials(operationArguments.TargetUri); + program.Trace.WriteLine($"deleting VSTS credentials for '{operationArguments.TargetUri}'."); + var vstsAuth = authentication as Vsts.Authentication; + return await vstsAuth.DeleteCredentials(operationArguments.TargetUri); case AuthorityType.GitHub: - program.Trace.WriteLine($"deleting GitHub credentials for '{operationArguments.TargetUri}'."); - var ghAuth = authentication as Github.Authentication; - return await ghAuth.DeleteCredentials(operationArguments.TargetUri); + program.Trace.WriteLine($"deleting GitHub credentials for '{operationArguments.TargetUri}'."); + var ghAuth = authentication as Github.Authentication; + return await ghAuth.DeleteCredentials(operationArguments.TargetUri); case AuthorityType.Bitbucket: - program.Trace.WriteLine($"deleting Bitbucket credentials for '{operationArguments.TargetUri}'."); - var bbAuth = authentication as Bitbucket.Authentication; - return await bbAuth.DeleteCredentials(operationArguments.TargetUri, operationArguments.Username); + program.Trace.WriteLine($"deleting Bitbucket credentials for '{operationArguments.TargetUri}'."); + var bbAuth = authentication as Bitbucket.Authentication; + return await bbAuth.DeleteCredentials(operationArguments.TargetUri, operationArguments.Username); } } @@ -617,6 +617,17 @@ namespace Microsoft.Alm.Cli Trace.WriteLine($"Failed to parse {program.KeyTypeName(KeyType.ParentHwnd)}."); } } + + // Check for URL overrides provided by the calling process. + if (program.TryReadString(operationArguments, KeyType.UrlOverride, out value)) + { + program.Trace.WriteLine($"{program.KeyTypeName(KeyType.UrlOverride)} = '{value}'."); + + if (Uri.TryCreate(value, UriKind.Absolute, out Uri actualUri)) + { + operationArguments.UrlOverride = value; + } + } } public static void LogEvent(Program program, string message, EventLogEntryType eventType) @@ -688,154 +699,154 @@ namespace Microsoft.Alm.Cli { default: case AuthorityType.Basic: - { - var basicAuth = authentication as BasicAuthentication; + { + var basicAuth = authentication as BasicAuthentication; - // Attempt to get cached credentials or acquire credentials if interactivity is allowed. - if ((operationArguments.Interactivity != Interactivity.Always - && (credentials = await authentication.GetCredentials(operationArguments.TargetUri)) != null) - || (operationArguments.Interactivity != Interactivity.Never - && (credentials = await basicAuth.AcquireCredentials(operationArguments.TargetUri)) != null)) - { - program.Trace.WriteLine("credentials found."); - // No need to save the credentials explicitly, as Git will call back - // with a store command if the credentials are valid. - } - else - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); - program.LogEvent($"Failed to retrieve credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); - } + // Attempt to get cached credentials or acquire credentials if interactivity is allowed. + if ((operationArguments.Interactivity != Interactivity.Always + && (credentials = await authentication.GetCredentials(operationArguments.TargetUri)) != null) + || (operationArguments.Interactivity != Interactivity.Never + && (credentials = await basicAuth.AcquireCredentials(operationArguments.TargetUri)) != null)) + { + program.Trace.WriteLine("credentials found."); + // No need to save the credentials explicitly, as Git will call back + // with a store command if the credentials are valid. } - break; + else + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); + program.LogEvent($"Failed to retrieve credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); + } + } + break; case AuthorityType.AzureDirectory: + { + var aadAuth = authentication as Vsts.AadAuthentication; + var patOptions = new Vsts.PersonalAccessTokenOptions() { - var aadAuth = authentication as Vsts.AadAuthentication; - var patOptions = new Vsts.PersonalAccessTokenOptions() - { - RequireCompactToken = true, - TokenDuration = operationArguments.TokenDuration, - TokenScope = null, - }; + RequireCompactToken = true, + TokenDuration = operationArguments.TokenDuration, + TokenScope = null, + }; - // Attempt to get cached credentials -> non-interactive logon -> interactive - // logon note that AAD "credentials" are always scoped access tokens. - if (((operationArguments.Interactivity != Interactivity.Always - && ((credentials = await aadAuth.GetCredentials(operationArguments.TargetUri)) != null) - && (!operationArguments.ValidateCredentials - || await aadAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) - || (operationArguments.Interactivity != Interactivity.Always - && ((credentials = await aadAuth.NoninteractiveLogon(operationArguments.TargetUri, patOptions)) != null) - && (!operationArguments.ValidateCredentials - || await aadAuth.ValidateCredentials(operationArguments.TargetUri, credentials))) - || (operationArguments.Interactivity != Interactivity.Never - && ((credentials = await aadAuth.InteractiveLogon(operationArguments.TargetUri, patOptions)) != null) - && (!operationArguments.ValidateCredentials - || await aadAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); - program.LogEvent($"Azure Directory credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); - } - else - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); - program.LogEvent($"Failed to retrieve Azure Directory credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); - } + // Attempt to get cached credentials -> non-interactive logon -> interactive + // logon note that AAD "credentials" are always scoped access tokens. + if (((operationArguments.Interactivity != Interactivity.Always + && ((credentials = await aadAuth.GetCredentials(operationArguments.TargetUri)) != null) + && (!operationArguments.ValidateCredentials + || await aadAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) + || (operationArguments.Interactivity != Interactivity.Always + && ((credentials = await aadAuth.NoninteractiveLogon(operationArguments.TargetUri, patOptions)) != null) + && (!operationArguments.ValidateCredentials + || await aadAuth.ValidateCredentials(operationArguments.TargetUri, credentials))) + || (operationArguments.Interactivity != Interactivity.Never + && ((credentials = await aadAuth.InteractiveLogon(operationArguments.TargetUri, patOptions)) != null) + && (!operationArguments.ValidateCredentials + || await aadAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); + program.LogEvent($"Azure Directory credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); } - break; + else + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); + program.LogEvent($"Failed to retrieve Azure Directory credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); + } + } + break; case AuthorityType.MicrosoftAccount: + { + var msaAuth = authentication as Vsts.MsaAuthentication; + var patOptions = new Vsts.PersonalAccessTokenOptions() { - var msaAuth = authentication as Vsts.MsaAuthentication; - var patOptions = new Vsts.PersonalAccessTokenOptions() - { - RequireCompactToken = true, - TokenDuration = operationArguments.TokenDuration, - TokenScope = null, - }; + RequireCompactToken = true, + TokenDuration = operationArguments.TokenDuration, + TokenScope = null, + }; - // Attempt to get cached credentials -> interactive logon note that MSA - // "credentials" are always scoped access tokens. - if (((operationArguments.Interactivity != Interactivity.Always - && ((credentials = await msaAuth.GetCredentials(operationArguments.TargetUri)) != null) - && (!operationArguments.ValidateCredentials - || await msaAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) - || (operationArguments.Interactivity != Interactivity.Never - && ((credentials = await msaAuth.InteractiveLogon(operationArguments.TargetUri, patOptions)) != null) - && (!operationArguments.ValidateCredentials - || await msaAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); - program.LogEvent($"Microsoft Live credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); - } - else - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); - program.LogEvent($"Failed to retrieve Microsoft Live credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); - } + // Attempt to get cached credentials -> interactive logon note that MSA + // "credentials" are always scoped access tokens. + if (((operationArguments.Interactivity != Interactivity.Always + && ((credentials = await msaAuth.GetCredentials(operationArguments.TargetUri)) != null) + && (!operationArguments.ValidateCredentials + || await msaAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) + || (operationArguments.Interactivity != Interactivity.Never + && ((credentials = await msaAuth.InteractiveLogon(operationArguments.TargetUri, patOptions)) != null) + && (!operationArguments.ValidateCredentials + || await msaAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); + program.LogEvent($"Microsoft Live credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); } - break; + else + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); + program.LogEvent($"Failed to retrieve Microsoft Live credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); + } + } + break; case AuthorityType.GitHub: - { - var ghAuth = authentication as Github.Authentication; + { + var ghAuth = authentication as Github.Authentication; - if ((operationArguments.Interactivity != Interactivity.Always - && ((credentials = await ghAuth.GetCredentials(operationArguments.TargetUri)) != null) - && (!operationArguments.ValidateCredentials - || await ghAuth.ValidateCredentials(operationArguments.TargetUri, credentials))) - || (operationArguments.Interactivity != Interactivity.Never - && ((credentials = await ghAuth.InteractiveLogon(operationArguments.TargetUri)) != null) - && (!operationArguments.ValidateCredentials - || await ghAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); - program.LogEvent($"GitHub credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); - } - else - { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); - program.LogEvent($"Failed to retrieve GitHub credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); - } + if ((operationArguments.Interactivity != Interactivity.Always + && ((credentials = await ghAuth.GetCredentials(operationArguments.TargetUri)) != null) + && (!operationArguments.ValidateCredentials + || await ghAuth.ValidateCredentials(operationArguments.TargetUri, credentials))) + || (operationArguments.Interactivity != Interactivity.Never + && ((credentials = await ghAuth.InteractiveLogon(operationArguments.TargetUri)) != null) + && (!operationArguments.ValidateCredentials + || await ghAuth.ValidateCredentials(operationArguments.TargetUri, credentials)))) + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); + program.LogEvent($"GitHub credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); } - break; + else + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' not found."); + program.LogEvent($"Failed to retrieve GitHub credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); + } + } + break; case AuthorityType.Bitbucket: - { - var bbcAuth = authentication as Bitbucket.Authentication; + { + var bbcAuth = authentication as Bitbucket.Authentication; - if (((operationArguments.Interactivity != Interactivity.Always) - && ((credentials = await bbcAuth.GetCredentials(operationArguments.TargetUri, operationArguments.Username)) != null) - && (!operationArguments.ValidateCredentials - || ((credentials = await bbcAuth.ValidateCredentials(operationArguments.TargetUri, operationArguments.Username, credentials)) != null))) - || ((operationArguments.Interactivity != Interactivity.Never) - && ((credentials = await bbcAuth.InteractiveLogon(operationArguments.TargetUri, operationArguments.Username)) != null) - && (!operationArguments.ValidateCredentials - || ((credentials = await bbcAuth.ValidateCredentials(operationArguments.TargetUri, operationArguments.Username, credentials)) != null)))) + if (((operationArguments.Interactivity != Interactivity.Always) + && ((credentials = await bbcAuth.GetCredentials(operationArguments.TargetUri, operationArguments.Username)) != null) + && (!operationArguments.ValidateCredentials + || ((credentials = await bbcAuth.ValidateCredentials(operationArguments.TargetUri, operationArguments.Username, credentials)) != null))) + || ((operationArguments.Interactivity != Interactivity.Never) + && ((credentials = await bbcAuth.InteractiveLogon(operationArguments.TargetUri, operationArguments.Username)) != null) + && (!operationArguments.ValidateCredentials + || ((credentials = await bbcAuth.ValidateCredentials(operationArguments.TargetUri, operationArguments.Username, credentials)) != null)))) + { + program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); + // Bitbucket relies on a username + secret, so make sure there is a + // username to return. + if (operationArguments.Username != null) { - program.Trace.WriteLine($"credentials for '{operationArguments.TargetUri}' found."); - // Bitbucket relies on a username + secret, so make sure there is a - // username to return. - if (operationArguments.Username != null) - { - credentials = new Credential(operationArguments.Username, credentials.Password); - } - program.LogEvent($"Bitbucket credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); - } - else - { - program.LogEvent($"Failed to retrieve Bitbucket credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); + credentials = new Credential(operationArguments.Username, credentials.Password); } + program.LogEvent($"Bitbucket credentials for '{operationArguments.TargetUri}' successfully retrieved.", EventLogEntryType.SuccessAudit); } - break; + else + { + program.LogEvent($"Failed to retrieve Bitbucket credentials for '{operationArguments.TargetUri}'.", EventLogEntryType.FailureAudit); + } + } + break; case AuthorityType.Ntlm: - { - program.Trace.WriteLine($"'{operationArguments.TargetUri}' is NTLM."); - credentials = BasicAuthentication.NtlmCredentials; - } - break; + { + program.Trace.WriteLine($"'{operationArguments.TargetUri}' is NTLM."); + credentials = BasicAuthentication.NtlmCredentials; + } + break; } if (credentials != null) @@ -902,8 +913,8 @@ namespace Microsoft.Alm.Cli goto parse_localval; } - // Parse the value into a bool. - parse_localval: + // Parse the value into a bool. + parse_localval: // An empty value is unset / should not be there, so treat it as if it isn't. if (string.IsNullOrWhiteSpace(localVal)) diff --git a/Shared/Cli/OperationArguments.cs b/Shared/Cli/OperationArguments.cs index 6413d6d..191453d 100644 --- a/Shared/Cli/OperationArguments.cs +++ b/Shared/Cli/OperationArguments.cs @@ -80,6 +80,7 @@ namespace Microsoft.Alm.Cli private string _queryProtocol; private TargetUri _targetUri; private TimeSpan? _tokenDuration; + private string _urlOverride; private bool _useHttpPath; private bool _useLocalConfig; private bool _useModalUi; @@ -163,6 +164,7 @@ namespace Microsoft.Alm.Cli { _gitRemoteHttpCommandLine = value; + // Re-create the target Uri. CreateTargetUri(); } } @@ -332,6 +334,23 @@ namespace Microsoft.Alm.Cli set { _tokenDuration = value; } } + /// + /// Gets or sets the override value for the `` value. + /// + /// Default value is ``. + /// + public virtual string UrlOverride + { + get { return _urlOverride; } + set + { + _urlOverride = value; + + // Re-create the target Uri. + CreateTargetUri(); + } + } + /// /// Gets or sets `` if `` ignores local Git configuration values; otherwise ``. /// @@ -435,7 +454,7 @@ namespace Microsoft.Alm.Cli } /// - /// + /// Reads git-credential formatted input from ``, parses the data, and populates ``. /// /// /// Readable stream with credential protocol formatted information. @@ -576,9 +595,7 @@ namespace Microsoft.Alm.Cli /// The uniform-resource-locater of the proxy. public virtual void SetProxy(string url) { - Uri tmp = null; - - if (Uri.TryCreate(url, UriKind.Absolute, out tmp)) + if (Uri.TryCreate(url, UriKind.Absolute, out Uri tmp)) { Trace.WriteLine($"successfully set proxy to '{tmp.AbsoluteUri}'."); } @@ -621,7 +638,7 @@ namespace Microsoft.Alm.Cli /// public override string ToString() { - StringBuilder builder = new StringBuilder(); + var builder = new StringBuilder(); builder.Append("protocol=") .Append(_queryProtocol ?? string.Empty) @@ -686,7 +703,7 @@ namespace Microsoft.Alm.Cli string proxyUrl = _proxyUri?.OriginalString; string actualUrl = null; - StringBuilder buffer = new StringBuilder(); + var buffer = new StringBuilder(); // URI format is {protocol}://{username}@{host}/{path] with // everything optional except for {host}. @@ -721,32 +738,52 @@ namespace Microsoft.Alm.Cli queryUrl = buffer.ToString(); + // If the actual-url override has been set, honor it. + if (!string.IsNullOrEmpty(_urlOverride)) + { + if (Uri.TryCreate(_urlOverride, UriKind.Absolute, out Uri uri)) + { + actualUrl = uri.ToString(); + } + else + { + Trace.WriteLine($"failed to parse \"{_urlOverride}\", unable to set URL override."); + } + } // If the git-remote-http(s) command line has been captured, // try and parse it and provide the command-url . - if (!string.IsNullOrEmpty(_gitRemoteHttpCommandLine)) + else if (!string.IsNullOrEmpty(_gitRemoteHttpCommandLine)) { string[] parts = _gitRemoteHttpCommandLine.Split(' '); - switch(parts.Length) + switch (parts.Length) { case 1: + { + if (Uri.TryCreate(parts[0], UriKind.Absolute, out Uri uri)) { - if (Uri.TryCreate(parts[0], UriKind.Absolute, out Uri uri)) - { - actualUrl = uri.ToString(); - } + actualUrl = uri.ToString(); } - break; + else + { + Trace.WriteLine($"failed to parse \"{parts[0]}\", unable to set URL override."); + } + } + break; case 3: + { + if (Uri.TryCreate(parts[2], UriKind.Absolute, out Uri uri)) { - if (Uri.TryCreate(parts[2], UriKind.Absolute, out Uri uri)) - { - actualUrl = uri.ToString(); - } + actualUrl = uri.ToString(); } - break; - } + else + { + Trace.WriteLine($"failed to parse \"{parts[2]}\", unable to set URL override."); + } + } + break; + } } // Create the target URI object. @@ -778,7 +815,7 @@ namespace Microsoft.Alm.Cli case ',': case ';': case '=': - return true; + return true; } } return false; diff --git a/Shared/Cli/Program.cs b/Shared/Cli/Program.cs index e590476..0f4e63d 100644 --- a/Shared/Cli/Program.cs +++ b/Shared/Cli/Program.cs @@ -53,6 +53,7 @@ namespace Microsoft.Alm.Cli Namespace, PreserveCredentials, TokenDuration, + UrlOverride, Username, Validate, VstsScope, @@ -117,19 +118,19 @@ namespace Microsoft.Alm.Cli internal readonly Dictionary _configurationKeys = new Dictionary() { - { KeyType.Authority, "authority" }, - { KeyType.HttpProxy, "httpProxy" }, - { KeyType.HttpsProxy, "httpsProxy" }, - { KeyType.Interactive, "interactive" }, - { KeyType.ModalPrompt, "modalPrompt" }, - { KeyType.Namespace, "namespace" }, - { KeyType.PreserveCredentials, "preserve" }, - { KeyType.TokenDuration, "tokenDuration" }, - { KeyType.HttpPath, "useHttpPath" }, - { KeyType.Username, "username" }, - { KeyType.Validate, "validate" }, - { KeyType.VstsScope, "vstsScope" }, - { KeyType.Writelog, "writeLog" }, + { KeyType.Authority, "authority" }, + { KeyType.HttpProxy, "httpProxy" }, + { KeyType.HttpsProxy, "httpsProxy" }, + { KeyType.Interactive, "interactive" }, + { KeyType.ModalPrompt, "modalPrompt" }, + { KeyType.Namespace, "namespace" }, + { KeyType.PreserveCredentials, "preserve" }, + { KeyType.TokenDuration, "tokenDuration" }, + { KeyType.HttpPath, "useHttpPath" }, + { KeyType.Username, "username" }, + { KeyType.Validate, "validate" }, + { KeyType.VstsScope,"vstsScope" }, + { KeyType.Writelog, "writeLog" }, }; internal readonly Dictionary _environmentKeys = new Dictionary() { @@ -142,11 +143,12 @@ namespace Microsoft.Alm.Cli { KeyType.Interactive, "GCM_INTERACTIVE" }, { KeyType.ModalPrompt, "GCM_MODAL_PROMPT" }, { KeyType.Namespace, "GCM_NAMESPACE" }, + { KeyType.ParentHwnd, "GCM_MODAL_PARENTHWND" }, { KeyType.PreserveCredentials, "GCM_PRESERVE" }, { KeyType.TokenDuration, "GCM_TOKEN_DURATION" }, + { KeyType.UrlOverride, "GCM_URL_OVERRIDE" }, { KeyType.Validate, "GCM_VALIDATE" }, { KeyType.VstsScope, "GCM_VSTS_SCOPE" }, - { KeyType.ParentHwnd, "GCM_MODAL_PARENTHWND" }, { KeyType.Writelog, "GCM_WRITELOG" }, }; @@ -475,7 +477,7 @@ namespace Microsoft.Alm.Cli // If the value is true or a number greater than zero, then trace to standard error. if (Git.Configuration.PaserBoolean(traceValue)) { - Trace.AddListener(Console.Error); + Trace.AddListener(Error); } // If the value is a rooted path, then trace to that file and not to the console. else if (Path.IsPathRooted(traceValue))