James Moger
2011-07-20 a75a1819f4c7fa5080ddb47545fe9012a842e5b3
src/com/gitblit/utils/JGitUtils.java
@@ -166,7 +166,6 @@
      }
      fetch.setRefSpecs(specs);
      FetchResult result = fetch.call();
      repository.close();
      return result;
   }
@@ -299,14 +298,15 @@
   /**
    * Determine if a repository has any commits. This is determined by checking
    * for 1 or more heads.
    * the objects/info and objects/pack folders.
    * 
    * @param repository
    * @return true if the repository has commits
    */
   public static boolean hasCommits(Repository repository) {
      if (repository != null && repository.getDirectory().exists()) {
         return new File(repository.getDirectory(), Constants.R_HEADS).list().length > 0;
         return (new File(repository.getDirectory(), "objects/info").list().length > 0)
               || (new File(repository.getDirectory(), "objects/pack").list().length > 0);
      }
      return false;
   }