diff options
author | James Moger <james.moger@gitblit.com> | 2014-09-04 11:32:44 -0600 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-09-04 11:32:44 -0600 |
commit | ddcebbd982d81dabf8cb1c89f60f9b876a23b58c (patch) | |
tree | c9e45b5a127b83c4c35fa27d1c05ce22844549ae /src | |
parent | 9951ffbead909c537b6c76aec1ba17425222f5fe (diff) | |
parent | 2da1f2eae6354bae394e9513ddc1d66cdc13c7cb (diff) | |
download | gitblit-ddcebbd982d81dabf8cb1c89f60f9b876a23b58c.tar.gz gitblit-ddcebbd982d81dabf8cb1c89f60f9b876a23b58c.zip |
Merged #149 "Repo creation with initial commit fails if user does not have an email address"
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java index 46877168..b6c23591 100644 --- a/src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/NewRepositoryPage.java @@ -59,6 +59,7 @@ import com.gitblit.wicket.panels.AccessPolicyPanel; import com.gitblit.wicket.panels.BooleanChoiceOption;
import com.gitblit.wicket.panels.BooleanOption;
import com.gitblit.wicket.panels.RepositoryNamePanel;
+import com.google.common.base.Optional;
public class NewRepositoryPage extends RootSubPage {
@@ -243,7 +244,8 @@ public class NewRepositoryPage extends RootSubPage { try {
UserModel user = GitBlitWebSession.get().getUser();
- PersonIdent author = new PersonIdent(user.getDisplayName(), user.emailAddress);
+ String email = Optional.fromNullable(user.emailAddress).or(user.username + "@" + "gitblit");
+ PersonIdent author = new PersonIdent(user.getDisplayName(), email);
DirCache newIndex = DirCache.newInCore();
DirCacheBuilder indexBuilder = newIndex.builder();
|