summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorMartin Geisler <mgeisler@google.com>2022-07-08 11:05:24 +0200
committerMartin Geisler <mgeisler@google.com>2022-07-11 17:58:06 +0000
commit8db78c7d4db84ff9e191457bbf4b1254da321c7e (patch)
tree723eb98cd62a09e259713e3bb40aaaea9e9b8af0 /project.py
parent9fb64ae29cb978f869de5ff11a47f86e070b4274 (diff)
downloadgit-repo-8db78c7d4db84ff9e191457bbf4b1254da321c7e.tar.gz
project: simplify if-statement
Change-Id: I05e4505b45963fe6e85cf74a669afafd00fc83c0 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/340457 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Martin Geisler <mgeisler@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/project.py b/project.py
index 8274f022..cf58a624 100644
--- a/project.py
+++ b/project.py
@@ -792,10 +792,7 @@ class Project(object):
792 def HasChanges(self): 792 def HasChanges(self):
793 """Returns true if there are uncommitted changes. 793 """Returns true if there are uncommitted changes.
794 """ 794 """
795 if self.UncommitedFiles(get_all=False): 795 return bool(self.UncommitedFiles(get_all=False))
796 return True
797 else:
798 return False
799 796
800 def PrintWorkTreeStatus(self, output_redir=None, quiet=False): 797 def PrintWorkTreeStatus(self, output_redir=None, quiet=False):
801 """Prints the status of the repository to stdout. 798 """Prints the status of the repository to stdout.