]> source.dussan.org Git - gitblit.git/commitdiff
Handle the earliest tags from the Linux kernel repository (issue 25)
authorJames Moger <james.moger@gitblit.com>
Mon, 17 Oct 2011 21:46:27 +0000 (17:46 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 17 Oct 2011 21:46:27 +0000 (17:46 -0400)
docs/00_index.mkd
docs/04_releases.mkd
src/com/gitblit/models/RefModel.java
src/com/gitblit/wicket/pages/RepositoryPage.java
src/com/gitblit/wicket/pages/TagPage.java

index 746402e7695f275eb3c33520cc12b0f21612afe2..ee5faafbef40c7dfbf8793eedd47369a83812903 100644 (file)
@@ -38,7 +38,8 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit
 - added: Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.\r
 - fixed: federation protocol timestamps.  dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.  \r
     **This breaks 0.6.0 federation clients/servers.**\r
-- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)\r
+- fixed: Gitblit can now browse the Linux kernel repository (issue 25)\r
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8) (issue 23)\r
 - fixed: Set the RSS content type for Firefox 4 (issue 22)\r
 - fixed: Null pointer exception if did not set federation strategy (issue 20)\r
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
index bb238bbe2e5554b937e55b68119f44f75cb145b1..fad61d3296372c1d0c4d64d2a2d9248c34415e73 100644 (file)
@@ -12,7 +12,8 @@
 - added: Gitblit Manager (Java/Swing Application) for remote administration of a Gitblit server.\r
 - fixed: federation protocol timestamps.  dates are now serialized to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard.  \r
     **This breaks 0.6.0 federation clients/servers.**\r
-- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8)\r
+- fixed: Gitblit can now browse the Linux kernel repository (issue 25)\r
+- fixed: Gitblit now runs on Servlet 3.0 webservers (e.g. Tomcat 7, Jetty 8) (issue 23)\r
 - fixed: Set the RSS content type for Firefox 4 (issue 22)\r
 - fixed: Null pointer exception if did not set federation strategy (issue 20)\r
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
index fab5fc1f5a71deff8ca6dd666aa9ed39513422a8..acac776309fedf6a1905c3629752031742366fab 100644 (file)
@@ -24,6 +24,7 @@ import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.revwalk.RevCommit;\r
 import org.eclipse.jgit.revwalk.RevObject;\r
 import org.eclipse.jgit.revwalk.RevTag;\r
+import org.eclipse.jgit.revwalk.RevTree;\r
 \r
 /**\r
  * RefModel is a serializable model class that represents a tag or branch and\r
@@ -49,7 +50,10 @@ public class RefModel implements Serializable, Comparable<RefModel> {
                Date date = new Date(0);\r
                if (referencedObject != null) {\r
                        if (referencedObject instanceof RevTag) {\r
-                               date = ((RevTag) referencedObject).getTaggerIdent().getWhen();\r
+                               RevTag tag = (RevTag) referencedObject;\r
+                               if (tag.getTaggerIdent() != null) {\r
+                                       date = tag.getTaggerIdent().getWhen();\r
+                               }\r
                        } else if (referencedObject instanceof RevCommit) {\r
                                date = ((RevCommit) referencedObject).getCommitterIdent().getWhen();\r
                        }\r
index 272a3f5aed194b8c0c622f69a5c6556ac7e68551..2d616a49896cba612c01e394855f80400a11a2b6 100644 (file)
@@ -207,13 +207,14 @@ public abstract class RepositoryPage extends BasePage {
 \r
        protected Component createPersonPanel(String wicketId, PersonIdent identity,\r
                        SearchType searchType) {\r
+               String name = identity == null ? "" : identity.getName();\r
+               String address = identity == null ? "" : identity.getEmailAddress();\r
                boolean showEmail = GitBlit.getBoolean(Keys.web.showEmailAddresses, false);\r
-               if (!showEmail || StringUtils.isEmpty(identity.getName())\r
-                               || StringUtils.isEmpty(identity.getEmailAddress())) {\r
-                       String value = identity.getName();\r
+               if (!showEmail || StringUtils.isEmpty(name) || StringUtils.isEmpty(address)) {\r
+                       String value = name;\r
                        if (StringUtils.isEmpty(value)) {\r
                                if (showEmail) {\r
-                                       value = identity.getEmailAddress();\r
+                                       value = address;\r
                                } else {\r
                                        value = getString("gb.missingUsername");\r
                                }\r
@@ -226,17 +227,15 @@ public abstract class RepositoryPage extends BasePage {
                        return partial;\r
                } else {\r
                        Fragment fullPerson = new Fragment(wicketId, "fullPersonIdent", this);\r
-                       LinkPanel nameLink = new LinkPanel("personName", "list", identity.getName(),\r
-                                       SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,\r
-                                                       identity.getName(), searchType));\r
-                       setPersonSearchTooltip(nameLink, identity.getName(), searchType);\r
+                       LinkPanel nameLink = new LinkPanel("personName", "list", name, SearchPage.class,\r
+                                       WicketUtils.newSearchParameter(repositoryName, objectId, name, searchType));\r
+                       setPersonSearchTooltip(nameLink, name, searchType);\r
                        fullPerson.add(nameLink);\r
 \r
-                       LinkPanel addressLink = new LinkPanel("personAddress", "list", "<"\r
-                                       + identity.getEmailAddress() + ">", SearchPage.class,\r
-                                       WicketUtils.newSearchParameter(repositoryName, objectId,\r
-                                                       identity.getEmailAddress(), searchType));\r
-                       setPersonSearchTooltip(addressLink, identity.getEmailAddress(), searchType);\r
+                       LinkPanel addressLink = new LinkPanel("personAddress", "list", "<" + address + ">",\r
+                                       SearchPage.class, WicketUtils.newSearchParameter(repositoryName, objectId,\r
+                                                       address, searchType));\r
+                       setPersonSearchTooltip(addressLink, address, searchType);\r
                        fullPerson.add(addressLink);\r
                        return fullPerson;\r
                }\r
index c1efb8986d47cbb4be1a0fda99ac058441214b69..a346670e8b5d1f663b023c791555585d19108bd1 100644 (file)
@@ -17,6 +17,7 @@ package com.gitblit.wicket.pages;
 \r
 import java.text.MessageFormat;\r
 import java.util.Arrays;\r
+import java.util.Date;\r
 import java.util.List;\r
 \r
 import org.apache.wicket.PageParameters;\r
@@ -80,8 +81,11 @@ public class TagPage extends RepositoryPage {
                add(new Label("taggedObjectType", getString(typeKey)));\r
 \r
                add(createPersonPanel("tagger", tagRef.getAuthorIdent(), SearchType.AUTHOR));\r
-               add(WicketUtils.createTimestampLabel("tagDate", tagRef.getAuthorIdent().getWhen(),\r
-                               getTimeZone()));\r
+               Date when = new Date(0);\r
+               if (tagRef.getAuthorIdent() != null) {\r
+                       when = tagRef.getAuthorIdent().getWhen();\r
+               }\r
+               add(WicketUtils.createTimestampLabel("tagDate", when, getTimeZone()));\r
 \r
                addFullText("fullMessage", tagRef.getFullMessage(), true);\r
        }\r