Browse Source

Sujith :) ->
1. Slight refactoring

sujith 1 month ago
parent
commit
db74c7a5ea

+ 5 - 1
Assets/Better Git/Arbitrator/Editor/Services/GitCommand.cs

@@ -44,12 +44,16 @@ namespace Terra.Arbitrator.Services
                 stdErrBuffer.AppendLine(line);
                 progress?.Report(line); // Report progress for each line received.
             });
+            
+            var stdOutPipe = PipeTarget.ToDelegate(line => {
+                stdOutBuffer.AppendLine(line);
+            });
 
             var command = Cli.Wrap(execPath)
                              .WithArguments(args)
                              .WithWorkingDirectory(ProjectRoot)
                              .WithValidation(CommandResultValidation.None) // We handle validation manually
-                         | (PipeTarget.ToDelegate(x => stdOutBuffer.Append(x)), stdErrPipe);
+                         | (stdOutPipe, stdErrPipe);
 
             var result = await command.ExecuteAsync();
 

+ 1 - 1
Assets/Better Git/Arbitrator/Editor/Services/GitExecutors.cs

@@ -57,7 +57,7 @@ namespace Terra.Arbitrator.Services
             var originalUrl = remote.Url;
 
             var authenticatedUrl = Regex.Replace(originalUrl, 
-                @"://", 
+                "://", 
                 $"://{Uri.EscapeDataString(authUsername)}:{Uri.EscapeDataString(authPassword)}@");
 
             return authenticatedUrl;