diff options
author | Matthieu Gautier <starmad@pegase.localdomain> | 2009-03-30 23:50:12 +0200 |
---|---|---|
committer | Matthieu Gautier <starmad@pegase.localdomain> | 2009-03-30 23:50:12 +0200 |
commit | 3c94ee53d7ddf83f02acd08e64973c5aa6db91f2 (patch) | |
tree | ebeb02e872b742ee003513c1f955f96f8363c0fb | |
parent | 2c7f972ac6b094f4b3088595594f0c82f991ebcf (diff) | |
download | g-ed-it-3c94ee53d7ddf83f02acd08e64973c5aa6db91f2.tar.gz g-ed-it-3c94ee53d7ddf83f02acd08e64973c5aa6db91f2.tar.xz g-ed-it-3c94ee53d7ddf83f02acd08e64973c5aa6db91f2.zip |
Fix a bug in docBar when document is untitled.
Signed-off-by: Matthieu Gautier <starmad@pegase.localdomain>
-rw-r--r-- | g-ed-it/docBar.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/g-ed-it/docBar.py b/g-ed-it/docBar.py index aaf4eaf..cf16265 100644 --- a/g-ed-it/docBar.py +++ b/g-ed-it/docBar.py @@ -71,16 +71,17 @@ class DocBar (object): self.toBeKilled = False; self.other = False; - statusStr = subprocess.Popen(["git-ls-files","--exclude-standard","-m","-c","-d","-o","-v",os.path.basename(uri)],stdout=subprocess.PIPE,cwd=cwd).communicate()[0] - statusLines = statusStr.split("\n") - for statusLine in statusLines[:-1]: - status = statusLine.split()[0] - if status == "H": self.cached = True - if status == "M": self.unmerged = True - if status == "R": self.deleted = True - if status == "C": self.changed = True - if status == "K": self.toBeKilled = True - if status == "?": self.other = True + if not self.doc.is_untitled(): + statusStr = subprocess.Popen(["git-ls-files","--exclude-standard","-m","-c","-d","-o","-v",os.path.basename(uri)],stdout=subprocess.PIPE,cwd=cwd).communicate()[0] + statusLines = statusStr.split("\n") + for statusLine in statusLines[:-1]: + status = statusLine.split()[0] + if status == "H": self.cached = True + if status == "M": self.unmerged = True + if status == "R": self.deleted = True + if status == "C": self.changed = True + if status == "K": self.toBeKilled = True + if status == "?": self.other = True self.setDocInfo() pass |