Fish: extract git tree check to separate function.