@@ -318,181 +318,6 @@ public String getSha(String reference)
318318 .trim ());
319319 }
320320
321- /**
322- * Returns full message of the provided commit
323- *
324- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
325- * @return full message of the provided commit
326- * @throws IOException If an error was encountered while writing command input or reading output
327- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
328- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
329- * finish
330- */
331- @ Nullable
332- @ Override
333- public String getFullMessage (String commit )
334- throws IOException , TimeoutException , InterruptedException {
335- if (GitUtils .isNotValidCommit (commit )) {
336- return null ;
337- }
338- return executeCommand (
339- Command .OTHER ,
340- () ->
341- commandExecutor
342- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%B" , commit )
343- .trim ());
344- }
345-
346- /**
347- * Returns author name for the provided commit
348- *
349- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
350- * @return author name for the provided commit
351- * @throws IOException If an error was encountered while writing command input or reading output
352- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
353- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
354- * finish
355- */
356- @ Nullable
357- @ Override
358- public String getAuthorName (String commit )
359- throws IOException , TimeoutException , InterruptedException {
360- if (GitUtils .isNotValidCommit (commit )) {
361- return null ;
362- }
363- return executeCommand (
364- Command .OTHER ,
365- () ->
366- commandExecutor
367- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%an" , commit )
368- .trim ());
369- }
370-
371- /**
372- * Returns author email for the provided commit
373- *
374- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
375- * @return author email for the provided commit
376- * @throws IOException If an error was encountered while writing command input or reading output
377- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
378- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
379- * finish
380- */
381- @ Nullable
382- @ Override
383- public String getAuthorEmail (String commit )
384- throws IOException , TimeoutException , InterruptedException {
385- if (GitUtils .isNotValidCommit (commit )) {
386- return null ;
387- }
388- return executeCommand (
389- Command .OTHER ,
390- () ->
391- commandExecutor
392- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%ae" , commit )
393- .trim ());
394- }
395-
396- /**
397- * Returns author date in strict ISO 8601 format for the provided commit
398- *
399- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
400- * @return author date in strict ISO 8601 format
401- * @throws IOException If an error was encountered while writing command input or reading output
402- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
403- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
404- * finish
405- */
406- @ Nullable
407- @ Override
408- public String getAuthorDate (String commit )
409- throws IOException , TimeoutException , InterruptedException {
410- if (GitUtils .isNotValidCommit (commit )) {
411- return null ;
412- }
413- return executeCommand (
414- Command .OTHER ,
415- () ->
416- commandExecutor
417- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%aI" , commit )
418- .trim ());
419- }
420-
421- /**
422- * Returns committer name for the provided commit
423- *
424- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
425- * @return committer name for the provided commit
426- * @throws IOException If an error was encountered while writing command input or reading output
427- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
428- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
429- * finish
430- */
431- @ Nullable
432- @ Override
433- public String getCommitterName (String commit )
434- throws IOException , TimeoutException , InterruptedException {
435- if (GitUtils .isNotValidCommit (commit )) {
436- return null ;
437- }
438- return executeCommand (
439- Command .OTHER ,
440- () ->
441- commandExecutor
442- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%cn" , commit )
443- .trim ());
444- }
445-
446- /**
447- * Returns committer email for the provided commit
448- *
449- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
450- * @return committer email for the provided commit
451- * @throws IOException If an error was encountered while writing command input or reading output
452- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
453- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
454- * finish
455- */
456- @ Nullable
457- @ Override
458- public String getCommitterEmail (String commit )
459- throws IOException , TimeoutException , InterruptedException {
460- if (GitUtils .isNotValidCommit (commit )) {
461- return null ;
462- }
463- return executeCommand (
464- Command .OTHER ,
465- () ->
466- commandExecutor
467- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%ce" , commit )
468- .trim ());
469- }
470-
471- /**
472- * Returns committer date in strict ISO 8601 format for the provided commit
473- *
474- * @param commit Commit SHA or reference (HEAD, branch name, etc) to check
475- * @return committer date in strict ISO 8601 format
476- * @throws IOException If an error was encountered while writing command input or reading output
477- * @throws TimeoutException If timeout was reached while waiting for Git command to finish
478- * @throws InterruptedException If current thread was interrupted while waiting for Git command to
479- * finish
480- */
481- @ Nullable
482- @ Override
483- public String getCommitterDate (String commit )
484- throws IOException , TimeoutException , InterruptedException {
485- if (GitUtils .isNotValidCommit (commit )) {
486- return null ;
487- }
488- return executeCommand (
489- Command .OTHER ,
490- () ->
491- commandExecutor
492- .executeCommand (IOUtils ::readFully , "git" , "log" , "-n" , "1" , "--format=%cI" , commit )
493- .trim ());
494- }
495-
496321 /**
497322 * Returns commit information for the provided commit
498323 *
0 commit comments