Class AbstractRepositoryCallback<T>

java.lang.Object
io.jenkins.plugins.forensics.git.util.AbstractRepositoryCallback<T>
Type Parameters:
T - the type of the return value
All Implemented Interfaces:
Serializable, org.jenkinsci.plugins.gitclient.RepositoryCallback<T>
Direct Known Subclasses:
DeltaRepositoryCallback

public abstract class AbstractRepositoryCallback<T> extends Object implements org.jenkinsci.plugins.gitclient.RepositoryCallback<T>
Code that gets executed on the machine where a Git working directory is local and Repository object is accessible.
Author:
Ullrich Hafner
See Also:
  • Constructor Details

    • AbstractRepositoryCallback

      public AbstractRepositoryCallback()
  • Method Details

    • getWorkTree

      public static String getWorkTree(org.eclipse.jgit.lib.Repository repository)
      Returns the root directory of the repository working tree. This path is absolute and normalized using the UNIX path separator.
      Parameters:
      repository - the repository
      Returns:
      the absolute path to the working tree
    • getAbsolutePath

      public static String getAbsolutePath(File absolute)
      Returns an absolute path for a given file in the Git repository, normalized using Unix path separators.
      Parameters:
      absolute - absolute file name
      Returns:
      the absolute path to the working tree