treefn in repo