Updated: Refactor cli script subtree fetch depth calculation to be more flexible and accurate