[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jgit-dev] Rename (move) detection with JGit
First of all: big Thank You for all the work on JGit. We are using it
as an embeded VCS and it works like a charm! Amazing library, it opens
up so many possibilities where git can be used as a versioned
Since I had such a positive experience with JGit I'm looking into some
other usages where rename detection would be handy (I'm talking about
git log -M here). From what I can see nothing like this exists in
JGit. I wonder how easy / hard would it be to implement such a thing.
I guess it would involve comparing 2 trees and - if a path is deleted
from one tree - checking if a blob with the same sha1 is not present
in another tree. This is all fine for a simple move but - from what I
understand - git also can detect move + modify if modifications are
'not too big'.
It is complete mystery for me how git establishes if a modification is
'not too big', I presume with some treshold on ... modified lines?
Anyway, my question is quite simple: do you think rename detection
(with 'small' content modification) would be possible with JGit? How
one could go about finding a blob that is 'similar enough' to aonother
Woudl be grateful for any input.