diff options
author | James Moger <james.moger@gitblit.com> | 2011-06-08 20:48:07 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-06-08 20:48:07 -0400 |
commit | 008322bec70a3a20bd00ed2219215a9f42fe0ca5 (patch) | |
tree | a5b8e4a6ba7169c94bc89d5a8a0ad838f5aea20a /src/com/gitblit/models/AnnotatedLine.java | |
parent | 716745e2dd9b3925b1229433e7072580206f731e (diff) | |
download | gitblit-008322bec70a3a20bd00ed2219215a9f42fe0ca5.tar.gz gitblit-008322bec70a3a20bd00ed2219215a9f42fe0ca5.zip |
Blame support finished, requires JGit 1.0.0. Checkstyle. Findbugs.
Diffstat (limited to 'src/com/gitblit/models/AnnotatedLine.java')
-rw-r--r-- | src/com/gitblit/models/AnnotatedLine.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/com/gitblit/models/AnnotatedLine.java b/src/com/gitblit/models/AnnotatedLine.java new file mode 100644 index 00000000..3d124765 --- /dev/null +++ b/src/com/gitblit/models/AnnotatedLine.java @@ -0,0 +1,40 @@ +/*
+ * Copyright 2011 gitblit.com.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gitblit.models;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import org.eclipse.jgit.revwalk.RevCommit;
+
+public class AnnotatedLine implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public final String commitId;
+ public final String author;
+ public final Date when;
+ public final int lineNumber;
+ public final String data;
+
+ public AnnotatedLine(RevCommit commit, int lineNumber, String data) {
+ this.commitId = commit.getName();
+ this.author = commit.getAuthorIdent().getName();
+ this.when = commit.getAuthorIdent().getWhen();
+ this.lineNumber = lineNumber;
+ this.data = data;
+ }
+}
\ No newline at end of file |