Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the exact way to read the git history configurable #153

Open
2 tasks
pmbittner opened this issue Jan 6, 2025 · 0 comments
Open
2 tasks

Make the exact way to read the git history configurable #153

pmbittner opened this issue Jan 6, 2025 · 0 comments
Labels

Comments

@pmbittner
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant