Skip to content

Commit

Permalink
Fix detection of the lack of user identity details in git global and …
Browse files Browse the repository at this point in the history
…system configuration files
  • Loading branch information
nulltoken committed Feb 8, 2012
1 parent 8925258 commit fb60830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LibGit2Sharp/RepositoryExtensions.cs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public static Commit Commit(this Repository repository, string message, Signatur


private static Signature BuildSignatureFromGlobalConfiguration(Repository repository, DateTimeOffset now) private static Signature BuildSignatureFromGlobalConfiguration(Repository repository, DateTimeOffset now)
{ {
var name = repository.Config.Get("user.name", string.Empty); var name = repository.Config.Get<string>("user.name", null);
var email = repository.Config.Get("user.email", string.Empty); var email = repository.Config.Get<string>("user.email", null);


if ((name == null) || (email == null)) if ((name == null) || (email == null))
{ {
Expand Down

0 comments on commit fb60830

Please sign in to comment.