public class RenameFileModification extends java.lang.Object implements TreeModification
TreeModification which renames a file or moves it to a different path.| Constructor and Description |
|---|
RenameFileModification(java.lang.String currentFilePath,
java.lang.String newFilePath) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFilePath()
Indicates a file path which is affected by this
TreeModification. |
java.util.List<org.eclipse.jgit.dircache.DirCacheEditor.PathEdit> |
getPathEdits(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit baseCommit)
Returns a list of
PathEdits which are necessary in order to achieve the desired
modification of the Git tree. |
public RenameFileModification(java.lang.String currentFilePath,
java.lang.String newFilePath)
public java.util.List<org.eclipse.jgit.dircache.DirCacheEditor.PathEdit> getPathEdits(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.revwalk.RevCommit baseCommit)
throws java.io.IOException
TreeModificationPathEdits which are necessary in order to achieve the desired
modification of the Git tree. The order of the PathEdits can be crucial and hence
shouldn't be changed.getPathEdits in interface TreeModificationrepository - the affected Git repositorybaseCommit - the commit to whose tree this modification is appliedPathEditsjava.io.IOException - if problems arise when accessing the repositorypublic java.lang.String getFilePath()
TreeModificationTreeModification. If the modification
refers to several file paths (e.g. renaming a file), returning either of them is appropriate as
long as the returned value is deterministic.getFilePath in interface TreeModification