Skip to content

Commit

Permalink
try making the status include the user and email
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed Jan 27, 2023
1 parent 067c88e commit c31d3a8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,17 @@ public string[] DetectPendingChanges(GitAssetsConfiguration config)
{
SetSafeDirectory(config);

if (!GitHandler.TryRun("status --porcelain", config.AssetsRepoLocation.ToString(), out var diffResult))
var a = Environment.GetEnvironmentVariable(GIT_COMMIT_OWNER_ENV_VAR);
var b = Environment.GetEnvironmentVariable(GIT_COMMIT_EMAIL_ENV_VAR);

var preface = "";
if (null != a && null != b)
{
preface = $"-c user.name =\"{a}\" -c user.email=\"{b}\" ";
}

var run = $"{preface}status --porcelain";
if (!GitHandler.TryRun($"status --porcelain", config.AssetsRepoLocation.ToString(), out var diffResult))
{
throw GenerateInvokeException(diffResult);
}
Expand Down

0 comments on commit c31d3a8

Please sign in to comment.