James Moger
2011-05-19 00afd77a2182ece3d9522d41b86b4ddd7e132288
src/com/gitblit/tests/JGitUtilsTest.java
@@ -15,6 +15,7 @@
import org.eclipse.jgit.storage.file.FileRepository;
import com.gitblit.utils.JGitUtils;
import com.gitblit.utils.JGitUtils.DiffOutputType;
import com.gitblit.wicket.models.PathModel.PathChangeModel;
import com.gitblit.wicket.models.RefModel;
import com.gitblit.wicket.models.TicketModel;
@@ -49,6 +50,14 @@
      Date date = JGitUtils.getLastChange(r);
      r.close();
      assertTrue("Could not get last repository change date!", date != null);
   }
   public void testFirstCommit() throws Exception {
      Repository r = getRepository();
      RevCommit commit = JGitUtils.getFirstCommit(r, null);
      r.close();
      assertTrue("Could not get first commit!", commit != null);
      System.out.println(commit.getName() + " " + commit.getShortMessage());
   }
   public void testRetrieveRevObject() throws Exception {
@@ -90,7 +99,7 @@
   public void testCommitDiff() throws Exception {
      Repository r = getRepository();
      RevCommit commit = JGitUtils.getCommit(r, Constants.HEAD);
      String diff = JGitUtils.getCommitDiff(r, commit, false);
      String diff = JGitUtils.getCommitDiff(r, commit, DiffOutputType.PLAIN);
      r.close();
      System.out.println(diff);
   }