Clear up semantics of tree_status
authorDavid Kågedal <davidk@lysator.liu.se>
Fri, 14 Sep 2007 22:31:19 +0000 (00:31 +0200)
committerKarl Hasselström <kha@treskal.com>
Sun, 23 Sep 2007 22:54:06 +0000 (00:54 +0200)
commit70028538744f36056327d77eed89151a83813d56
tree5dec0927c3c7548139b2ab8acc578a9fa730774e
parent98d8dc86e5559fd183c8240d59794a94e2ae67d3
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>
stgit/commands/status.py
stgit/git.py