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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAbsolutePath
(File absolute) Returns an absolute path for a given file in the Git repository, normalized using Unix path separators.static String
getWorkTree
(org.eclipse.jgit.lib.Repository repository) Returns the root directory of the repository working tree.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jenkinsci.plugins.gitclient.RepositoryCallback
invoke
-
Constructor Details
-
AbstractRepositoryCallback
public AbstractRepositoryCallback()
-
-
Method Details
-
getWorkTree
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
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
-