Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit ab5af34

Browse files
Renaming variables
1 parent 6cf8003 commit ab5af34

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

src/GitHub.Api/Installer/GitInstaller.cs

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -112,31 +112,35 @@ public void SetupGitIfNeeded(ActionTask<NPath> onSuccess, ITask onFailure)
112112
}
113113
else
114114
{
115-
ITask downloadFilesTask1 = null;
115+
ITask downloadFilesTask = null;
116116
if (gitArchiveFilePath == null || gitLfsArchivePath == null)
117117
{
118-
downloadFilesTask1 = CreateDownloadTask();
118+
downloadFilesTask = CreateDownloadTask();
119119
}
120120

121-
var tempZipExtractPath1 = NPath.CreateTempDirectory("git_zip_extract_zip_paths");
122-
var gitExtractPath1 = tempZipExtractPath1.Combine("git").CreateDirectory();
123-
var gitLfsExtractPath1 = tempZipExtractPath1.Combine("git-lfs").CreateDirectory();
121+
var tempZipExtractPath = NPath.CreateTempDirectory("git_zip_extract_zip_paths");
122+
var gitExtractPath = tempZipExtractPath.Combine("git").CreateDirectory();
123+
var gitLfsExtractPath = tempZipExtractPath.Combine("git-lfs").CreateDirectory();
124124

125-
var resultTask1 = new UnzipTask(cancellationToken, gitArchiveFilePath, gitExtractPath1, sharpZipLibHelper, environment.FileSystem, GitInstallDetails.GitExtractedMD5)
126-
.Then(new UnzipTask(cancellationToken, gitLfsArchivePath, gitLfsExtractPath1, sharpZipLibHelper, environment.FileSystem, GitInstallDetails.GitLfsExtractedMD5))
125+
var resultTask = new UnzipTask(cancellationToken, gitArchiveFilePath, gitExtractPath, sharpZipLibHelper, environment.FileSystem, GitInstallDetails.GitExtractedMD5)
126+
.Then(new UnzipTask(cancellationToken, gitLfsArchivePath, gitLfsExtractPath, sharpZipLibHelper, environment.FileSystem, GitInstallDetails.GitLfsExtractedMD5))
127127
.Then(() => {
128-
var targetGitLfsExecPath1 = installDetails.GetGitLfsExecPath(gitExtractPath1);
129-
var extractGitLfsExePath1 = gitLfsExtractPath1.Combine(installDetails.GitLfsExec);
130-
extractGitLfsExePath1.Move(targetGitLfsExecPath1);
128+
var targetGitLfsExecPath = installDetails.GetGitLfsExecPath(gitExtractPath);
129+
var extractGitLfsExePath = gitLfsExtractPath.Combine(installDetails.GitLfsExec);
131130

132-
Logger.Trace("Moving tempDirectory:\"{0}\" to extractTarget:\"{1}\"", gitExtractPath1,
131+
Logger.Trace("Moving Git LFS Exe:\"{0}\" to target in tempDirectory:\"{1}\" ", extractGitLfsExePath,
132+
targetGitLfsExecPath);
133+
134+
extractGitLfsExePath.Move(targetGitLfsExecPath);
135+
136+
Logger.Trace("Moving tempDirectory:\"{0}\" to extractTarget:\"{1}\"", gitExtractPath,
133137
installDetails.GitInstallPath);
134138

135139
installDetails.GitInstallPath.EnsureParentDirectoryExists();
136-
gitExtractPath1.Move(installDetails.GitInstallPath);
140+
gitExtractPath.Move(installDetails.GitInstallPath);
137141

138-
Logger.Trace("Deleting tempZipPath:\"{0}\"", tempZipExtractPath1);
139-
tempZipExtractPath1.DeleteIfExists();
142+
Logger.Trace("Deleting tempZipPath:\"{0}\"", tempZipExtractPath);
143+
tempZipExtractPath.DeleteIfExists();
140144
})
141145
.Finally((b, exception) => {
142146
if (b)
@@ -155,12 +159,12 @@ public void SetupGitIfNeeded(ActionTask<NPath> onSuccess, ITask onFailure)
155159
}
156160
});
157161

158-
if (downloadFilesTask1 != null)
162+
if (downloadFilesTask != null)
159163
{
160-
resultTask1 = downloadFilesTask1.Then(resultTask1);
164+
resultTask = downloadFilesTask.Then(resultTask);
161165
}
162166

163-
resultTask1.Start();
167+
resultTask.Start();
164168
}
165169

166170
}).Start();

0 commit comments

Comments
 (0)