Gets file changes since the merge-base between two references.
This function finds the common ancestor (merge-base) between base and head,
then compares head against that common ancestor using git diff base...head.
If no merge-base exists, falls back to direct comparison.
The function handles fetching commits as needed, progressively increasing
fetch depth until a merge-base is found or full history is fetched.
Parameters
base: string
Base reference to find merge-base with
head: string
Head reference to compare
initialFetchDepth: number
Initial number of commits to fetch
Returns Promise<File[]>
Array of files changed since merge-base
Throws
When references cannot be resolved or git commands fail
Gets file changes since the merge-base between two references.
This function finds the common ancestor (merge-base) between base and head, then compares head against that common ancestor using
git diff base...head
. If no merge-base exists, falls back to direct comparison.The function handles fetching commits as needed, progressively increasing fetch depth until a merge-base is found or full history is fetched.