public static PullResult pull ( Git git , String remoteName , String remoteUrl , String branch , MergeStrategy mergeStrategy , GitAuthenticationConfigurator authConfigurator ) throws GitAPIException , URISyntaxException { addRemote ( git , remoteName , remoteUrl ) ; PullCommand command = git . pull ( ) ; command . setRemote ( remoteName ) ; command . setRemoteBranchName ( branch ) ; if ( mergeStrategy != null ) { command . setStrategy ( mergeStrategy ) ; } if ( authConfigurator != null ) { authConfigurator . configureAuthentication ( command ) ; } return command . call ( ) ; }
Execute a Git pull .