[Git] Store Subject in GitCommit.

This commit is contained in:
Kirill Likhodedov
2011-05-12 11:39:38 +04:00
parent b5d0004b1a
commit 4a8cb65e7f
3 changed files with 9 additions and 2 deletions
@@ -502,7 +502,7 @@ public class GitHistoryUtils {
final String s = parseRefs(refs, currentRefs, locals, remotes, tags);
gitCommit = new GitCommit(AbstractHash.create(record.getShortHash()), new SHAHash(record.getHash()), record.getAuthorName(),
record.getCommitterName(),
record.getDate(), record.getFullMessage(),
record.getDate(), record.getSubject(), record.getFullMessage(),
new HashSet<String>(Arrays.asList(record.getParentsShortHashes())), record.getFilePaths(root),
record.getAuthorEmail(),
record.getCommitterEmail(), tags, locals, remotes,
@@ -31,6 +31,7 @@ public class GitCommit {
private final SHAHash myHash;
private final String myAuthor;
private final String myCommitter;
private final String mySubject;
private final String myDescription;
private final Date myDate;
@@ -60,6 +61,7 @@ public class GitCommit {
final String author,
final String committer,
final Date date,
final String subject,
final String description,
final Set<String> parentsHashes,
final List<FilePath> pathsList,
@@ -74,6 +76,7 @@ public class GitCommit {
myAuthor = author;
myCommitter = committer;
myDate = date;
mySubject = subject;
myDescription = description;
myHash = hash;
myParentsHashes = parentsHashes;
@@ -223,4 +226,8 @@ public class GitCommit {
}
});
}
public String getSubject() {
return mySubject;
}
}
@@ -194,7 +194,7 @@ public class DetailsLoaderImpl implements DetailsLoader {
private GitCommit createNotLoadedCommit(AbstractHash shortHash) {
final String notKnown = "Can not load";
return new GitCommit(shortHash, SHAHash.emulate(shortHash), notKnown, notKnown, new Date(0),
return new GitCommit(shortHash, SHAHash.emulate(shortHash), notKnown, notKnown, new Date(0), notKnown,
"Can not load details", Collections.<String>emptySet(), Collections.<FilePath>emptyList(), notKnown,
notKnown, Collections.<String>emptyList(), Collections.<String>emptyList(), Collections.<String>emptyList(),
Collections.<Change>emptyList(), 0);