Getting extra data/filtered from getLog
combatpoodle opened this issue · 2 comments
Hey, I'm looking at using your project in a big project and have a few Git-specific tweaks we'll be needing. As far as I can tell, there aren't any good analogs in Subversion for them (at least, without some fairly involved/inefficient scripting to adapt it).
The big thing I'll be modifying up front will be getLog()
to add some extra options for showing only the history of certain files, showing incremental changes (and/or diffs) at certain commits, etc.
Normally, I'd just adapt all the interfaces and have the incompatible ones either throw exceptions or return failures when they are incapable of those operations. Does that paradigm work for you and/or this project? Or should I introduce it in a different way such as just tacking in a new function?
Hi there,
as long as the new functionality fits into the getLog()
method and does not require tons of new parameters, I'd go for the mentioned approach as well - extend the interface, implement the functionality in the Git repository class and throw some NotSupportedException
on the SVN repository class.
If the extension requires more than just a few new parameters, I'd perhaps prefer an additional method in the Git repository class instead.
The contract implemented by both the Git as well as the SVN repository class, is primarily based on the requirements of using the repository in the stream wrapper and with the transactional
method in the abstract base repository class. If the new functionality will not touch either the stream wrapper or the transactional behavior, and if the changes/additions are substantial enough, adding a new method might also be the better option.
Just add your extensions and we'll see if we need to change some details...