Closed
Description
In DiffDetective, we analyze the git histories of projects. However, we cannot freely configure so far which parts of the history we are looking at (which branch for example). We have a DiffFilter to filter out certain commits or files (e.g., merge commits and non C/C++ source code files). We cannot configure the git log
call though, which is deeply buried in some static functions in the GitDiffer class:
here and
here. These should be the only places where we call git log
but I cannot promise.
Tasks:
- Abstract the call to
git log
to make it configurable. Probably an Interface would be good here with a default implementation (same as current implementation). This interface could then be implemented for other configurations of the git-log-call (e.g., show only commits from main branch for example, or show all commits). - Move the default DiffFilter from here to the DiffFilter class, so that the Default value can actually be found. Here it would also be good to offer different defaults, depending on whether we are working with C projects or with Java projects for example.
New classes should be located within the same Java package as the other classes linked above.