summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/utils/JGitUtils.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2015-09-18 11:23:42 -0400
committerJames Moger <james.moger@gitblit.com>2015-09-18 11:23:42 -0400
commita592329a82d0a85d33abcc63f08df20b79e8e4f7 (patch)
tree2f96ec8cd71727634dd15c8da914ccdccabc9bdf /src/main/java/com/gitblit/utils/JGitUtils.java
parent9bd0f28be7b974988630ec8facc8bcfd748afc9d (diff)
downloadgitblit-a592329a82d0a85d33abcc63f08df20b79e8e4f7.tar.gz
gitblit-a592329a82d0a85d33abcc63f08df20b79e8e4f7.zip
Use author date to be consistent with other tools (fixes #919)
Diffstat (limited to 'src/main/java/com/gitblit/utils/JGitUtils.java')
-rw-r--r--src/main/java/com/gitblit/utils/JGitUtils.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/utils/JGitUtils.java b/src/main/java/com/gitblit/utils/JGitUtils.java
index 356a796c..c3d02073 100644
--- a/src/main/java/com/gitblit/utils/JGitUtils.java
+++ b/src/main/java/com/gitblit/utils/JGitUtils.java
@@ -30,7 +30,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Pattern;
-import com.google.common.base.Strings;
import org.apache.commons.io.filefilter.TrueFileFilter;
import org.eclipse.jgit.api.CloneCommand;
import org.eclipse.jgit.api.FetchCommand;
@@ -91,6 +90,7 @@ import com.gitblit.models.PathModel;
import com.gitblit.models.PathModel.PathChangeModel;
import com.gitblit.models.RefModel;
import com.gitblit.models.SubmoduleModel;
+import com.google.common.base.Strings;
/**
* Collection of static methods for retrieving information from a repository.
@@ -691,7 +691,10 @@ public class JGitUtils {
if (commit == null) {
return new Date(0);
}
- return commit.getAuthorIdent().getWhen();
+ if (commit.getAuthorIdent() != null) {
+ return commit.getAuthorIdent().getWhen();
+ }
+ return getCommitDate(commit);
}
/**