Building a fetcher for Dolt

I’m considering writing a fetcher for dolt, (basically it’s git + sql) to enable using datasets as inputs for derivations. How would one make a custom fetcher? Oftentimes datasets can be fairly large, so when a user of a fetchDolt function would update the commit hash, it would be ideal that the earlier clone could be used and only the new commits would be fetched, so that the unaltered parts of data wouldn’t be downloaded again. Is this possible to achieve?