James Moger
2014-02-28 115551c76c3af879b49447dce64d7a6c29049c40
src/main/java/com/gitblit/utils/JGitUtils.java
@@ -704,6 +704,7 @@
         return null;
      }
      RevCommit commit = null;
      RevWalk walk = null;
      try {
         // resolve object id
         ObjectId branchObject;
@@ -712,12 +713,18 @@
         } else {
            branchObject = repository.resolve(objectId);
         }
         RevWalk walk = new RevWalk(repository);
         if (branchObject == null) {
            return null;
         }
         walk = new RevWalk(repository);
         RevCommit rev = walk.parseCommit(branchObject);
         commit = rev;
         walk.dispose();
      } catch (Throwable t) {
         error(t, repository, "{0} failed to get commit {1}", objectId);
      } finally {
         if (walk != null) {
            walk.dispose();
         }
      }
      return commit;
   }