- Ensure Redmine url is properly formatted (issue 223)\r
- Use standard ServletRequestWrapper instead of custom wrapper (issue 224)\r
- Switch commit message back to a pre and ensure that it is properly escaped when combined with commit message regex substitution (issue 242)\r
+ - Fixed AddIndexedBranch tool --branch parameter (issue 247) \r
- Improve NPE handling for hook script enumeration (issue-253)\r
+ - Workaround missing commit information in blame page (JGit bug 374382, issue-254) \r
\r
changes:\r
- Improved error logging for servlet containers which provide a null contextFolder (issue 199)\r
- Lukasz Jader\r
- Martijn Laan\r
- Matthias Bauer\r
- - Michaël Pailloncy\r
+ - Micha�l Pailloncy\r
- Michael Schaefers\r
- Philip Boutros\r
- Rafael Cavazin\r
import java.io.Serializable;\r
import java.util.Date;\r
\r
+import org.eclipse.jgit.lib.ObjectId;\r
import org.eclipse.jgit.revwalk.RevCommit;\r
\r
/**\r
public final String data;\r
\r
public AnnotatedLine(RevCommit commit, int lineNumber, String data) {\r
- this.commitId = commit.getName();\r
- this.author = commit.getAuthorIdent().getName();\r
- this.when = commit.getAuthorIdent().getWhen();\r
+ if (commit == null) {\r
+ this.commitId = ObjectId.zeroId().getName();\r
+ this.author = "?";\r
+ this.when = new Date(0);\r
+ } else {\r
+ this.commitId = commit.getName();\r
+ this.author = commit.getAuthorIdent().getName();\r
+ this.when = commit.getAuthorIdent().getWhen();\r
+ }\r
this.lineNumber = lineNumber;\r
this.data = data;\r
}\r
import org.apache.wicket.markup.repeater.data.DataView;\r
import org.apache.wicket.markup.repeater.data.ListDataProvider;\r
import org.eclipse.jgit.lib.Constants;\r
+import org.eclipse.jgit.lib.ObjectId;\r
import org.eclipse.jgit.revwalk.RevCommit;\r
\r
import com.gitblit.GitBlit;\r
private int count;\r
private String lastCommitId = "";\r
private boolean showInitials = true;\r
+ private String zeroId = ObjectId.zeroId().getName();\r
\r
public void populateItem(final Item<AnnotatedLine> item) {\r
AnnotatedLine entry = item.getModelObject();\r
if (!lastCommitId.equals(entry.commitId)) {\r
lastCommitId = entry.commitId;\r
count++;\r
- // show the link for first line\r
- LinkPanel commitLink = new LinkPanel("commit", null,\r
- getShortObjectId(entry.commitId), CommitPage.class,\r
- newCommitParameter(entry.commitId));\r
- WicketUtils.setHtmlTooltip(commitLink,\r
- MessageFormat.format("{0}, {1}", entry.author, df.format(entry.when)));\r
- item.add(commitLink);\r
- showInitials = true;\r
+ if (zeroId.equals(entry.commitId)) {\r
+ // unknown commit\r
+ item.add(new Label("commit", "<?>"));\r
+ showInitials = false;\r
+ } else {\r
+ // show the link for first line\r
+ LinkPanel commitLink = new LinkPanel("commit", null,\r
+ getShortObjectId(entry.commitId), CommitPage.class,\r
+ newCommitParameter(entry.commitId));\r
+ WicketUtils.setHtmlTooltip(commitLink,\r
+ MessageFormat.format("{0}, {1}", entry.author, df.format(entry.when)));\r
+ item.add(commitLink);\r
+ showInitials = true;\r
+ }\r
} else {\r
if (showInitials) {\r
showInitials = false;\r