Created
September 27, 2012 05:35
-
-
Save seratch/3792334 to your computer and use it in GitHub Desktop.
My first JGit sample in Scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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,)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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