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

Commit 0515a92

Browse files
Merge branch 'fixes/git-client-should-return-user' into fixes/git-client-set-user
2 parents 2520504 + 82599d9 commit 0515a92

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/GitHub.Api/Git/GitClient.cs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -262,21 +262,23 @@ public ITask<User> GetConfigUserAndEmail()
262262
string username = null;
263263
string email = null;
264264

265-
return GetConfig(UserNameConfigKey, GitConfigSource.User).Then((success, value) => {
266-
if (success)
267-
{
268-
username = value;
269-
}
270-
271-
}).Then(GetConfig(UserEmailConfigKey, GitConfigSource.User).Then((success, value) => {
272-
if (success)
273-
{
274-
email = value;
275-
}
276-
})).Then(success => {
277-
Logger.Trace("{0}:{1} {2}:{3}", UserNameConfigKey, username, UserEmailConfigKey, email);
278-
return new User { Name= username, Email = email };
279-
});
265+
return GetConfig(UserNameConfigKey, GitConfigSource.User)
266+
.Then((success, value) => {
267+
if (success)
268+
{
269+
username = value;
270+
}
271+
})
272+
.Then(GetConfig(UserEmailConfigKey, GitConfigSource.User)
273+
.Then((success, value) => {
274+
if (success)
275+
{
276+
email = value;
277+
}
278+
})).Then(success => {
279+
Logger.Trace("{0}:{1} {2}:{3}", UserNameConfigKey, username, UserEmailConfigKey, email);
280+
return new User { Name= username, Email = email };
281+
});
280282
}
281283

282284
public ITask<List<GitLock>> ListLocks(bool local, BaseOutputListProcessor<GitLock> processor = null)

0 commit comments

Comments
 (0)