Clear up semantics of tree_status
The tree_status() function does a few slightly different things
depending on the arguments. This patch adds checks that the arguments
are consistent and that the returned value looks good.
It also changes the semantics slightly. If the 'files' parameter is
None, it will run status on all files. If 'files' is a list, it will
run status on only those files. This changes two things:
1) If 'files' is the empty list, it will run status on no files.
2) It 'files' is a list, it will never return the status for other files
Clearing this up will make it easier to understand code that is using
this function.
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>