public List < Commit > log ( File repositoryPath , GitLogOptions options ) throws JavaGitException , IOException { CheckUtilities . checkFileValidity ( repositoryPath ) ; GitLogParser parser = new GitLogParser ( ) ; List < String > command = buildCommand ( repositoryPath , options ) ; GitLogResponse response = ( GitLogResponse ) ProcessUtilities . runCommand ( repositoryPath , command , parser ) ; if ( response . containsError ( ) ) { int line = response . getError ( 0 ) . getLineNumber ( ) ; String error = response . getError ( 0 ) . error ( ) ; throw new JavaGitException ( 420001 , "Line " + line + ", " + error ) ; } return response . getLog ( ) ; }
Implementations of &lt ; git log&gt ; with options and one file to be added to index .