Logic for fetching Git revisions was wrong regarding the head revision and the max number of revisions to fetch.
 Also did a small refactoring on the repository bean implementation.
Sorting out conflicts