Class RenameFileModification
- java.lang.Object
- 
- com.google.gerrit.server.edit.tree.RenameFileModification
 
- 
- All Implemented Interfaces:
- TreeModification
 
 public class RenameFileModification extends Object implements TreeModification ATreeModificationwhich renames a file or moves it to a different path.
- 
- 
Constructor SummaryConstructors Constructor Description RenameFileModification(String currentFilePath, String newFilePath)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFilePath()Indicates a file path which is affected by thisTreeModification.List<org.eclipse.jgit.dircache.DirCacheEditor.PathEdit>getPathEdits(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.revwalk.RevCommit baseCommit)Returns a list ofPathEdits which are necessary in order to achieve the desired modification of the Git tree.
 
- 
- 
- 
Method Detail- 
getPathEditspublic List<org.eclipse.jgit.dircache.DirCacheEditor.PathEdit> getPathEdits(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.revwalk.RevCommit baseCommit) throws IOException Description copied from interface:TreeModificationReturns a list ofPathEdits which are necessary in order to achieve the desired modification of the Git tree. The order of thePathEdits can be crucial and hence shouldn't be changed.- Specified by:
- getPathEditsin interface- TreeModification
- Parameters:
- repository- the affected Git repository
- baseCommit- the commit to whose tree this modification is applied
- Returns:
- an ordered list of necessary PathEdits
- Throws:
- IOException- if problems arise when accessing the repository
 
 - 
getFilePathpublic String getFilePath() Description copied from interface:TreeModificationIndicates a file path which is affected by thisTreeModification. 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.- Specified by:
- getFilePathin interface- TreeModification
- Returns:
- an affected file path
 
 
- 
 
-