diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RenameCallback.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RenameCallback.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RenameCallback.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RenameCallback.java index ba3399ce9f..9856f2c252 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RenameCallback.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RenameCallback.java @@ -23,8 +23,30 @@ public abstract class RenameCallback { * Called whenever a diff was found that is actually a rename or copy of a * file. * + * <p>Subclass of this class have to override this to receive diffEntry for + * the rename. + * * @param entry * the entry representing the rename/copy */ public abstract void renamed(DiffEntry entry); + + /** + * Called whenever a diff was found that is actually a rename or copy of a + * file along with the commit that caused it. + * + * <p>Subclass of this class have an option to override this if it wants to + * know what commit generated the diffEntry. Otherwise defaults to the + * {@link RenameCallback#renamed(DiffEntry)} function. + * + * @param entry + * the entry representing the rename/copy + * @param commit + * commit at which callback occurred + * + * @since 6.7 + */ + public void renamed(DiffEntry entry, RevCommit commit) { + renamed(entry); + } } |