From 75cdfbb66a0824b57b538623a3024af9c22785a4 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 26 Oct 2019 13:29:10 -0400 Subject: [PATCH] Override is_empty to use only branches --- gitsrht/git.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gitsrht/git.py b/gitsrht/git.py index d54f08e..852d35f 100644 --- a/gitsrht/git.py +++ b/gitsrht/git.py @@ -59,6 +59,10 @@ class Repository(GitRepository): branch = self.branches.get(branch) return branch + @property + def is_empty(self): + return len(list(self.branches.local)) == 0 + class AnnotatedTreeEntry: def __init__(self, repo, entry): self._entry = entry -- 2.38.4