James Moger
2012-02-23 4fea450fd3edfba6bb9e2c3c0a9231c6d227a09c
src/com/gitblit/utils/JGitUtils.java
@@ -423,11 +423,9 @@
    * last modified date of the repository folder is returned.
    * 
    * @param repository
    * @param branch
    *            if unspecified, all branches are checked.
    * @return
    */
   public static Date getLastChange(Repository repository, String branch) {
   public static Date getLastChange(Repository repository) {
      if (!hasCommits(repository)) {
         // null repository
         if (repository == null) {
@@ -436,7 +434,7 @@
         // fresh repository
         return new Date(repository.getDirectory().lastModified());
      }
      if (StringUtils.isEmpty(branch)) {
         List<RefModel> branchModels = getLocalBranches(repository, true, -1);
         if (branchModels.size() > 0) {
            // find most recent branch update
@@ -447,15 +445,10 @@
               }
            }
            return lastChange;
         } else {
            // try to find head
            branch = Constants.HEAD;
         }
      }
      // lookup specified branch
      RevCommit commit = getCommit(repository, branch);
      return getCommitDate(commit);
      // default to the repository folder modification date
      return new Date(repository.getDirectory().lastModified());
   }
   /**
@@ -962,6 +955,9 @@
         } else {
            branchObject = repository.resolve(objectId);
         }
         if (branchObject == null) {
            return list;
         }
         RevWalk rw = new RevWalk(repository);
         rw.markStart(rw.parseCommit(branchObject));