Logic for fetching Git revisions was wrong regarding the head revision and the max number of revisions to fetch.