Skip to content

Instantly share code, notes, and snippets.

@seratch
Created September 27, 2012 05:35
Show Gist options
  • Save seratch/3792334 to your computer and use it in GitHub Desktop.
Save seratch/3792334 to your computer and use it in GitHub Desktop.
My first JGit sample in Scala
// http://www.eclipse.org/jgit/download/
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "[2.1,)"
import org.eclipse.jgit.api._
import scala.collection.JavaConverters._
val cloneCommand = new CloneCommand().setURI("git://github.com/seratch/scalikejdbc.git")
val git = cloneCommand.call()
val logs = git.log.call()
logs.asScala.take(10).foreach { l => println(l) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment