API: allow recursive tree
Created by: rebecamendez
Related pull request: https://github.com/gitlabhq/gitlabhq/pull/8519. I change a little bit the function to reduce the complexity, and I think a can't do anything to reduce more.
Created by: rebecamendez
Related pull request: https://github.com/gitlabhq/gitlabhq/pull/8519. I change a little bit the function to reduce the complexity, and I think a can't do anything to reduce more.