has_uncommitted_changes(): fall back to empty tree