| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4083dd8 commit 3aeef46
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,13 +84,16 @@ class Diffable: | |||
| 84 | 84 | compatible type. | |
| 85 | 85 | ||
| 86 | 86 | :note: | |
| 87 | - Subclasses require a repo member as it is the case for | ||
| 88 | - :class:`~git.objects.base.Object` instances, for practical reasons we do not | ||
| 87 | + Subclasses require a repo member, as it is the case for | ||
| 88 | + :class:`~git.objects.base.Object` instances. For practical reasons we do not | ||
| 89 | 89 | derive from :class:`~git.objects.base.Object`. | |
| 90 | 90 | """ | |
| 91 | 91 | ||
| 92 | 92 | __slots__ = () | |
| 93 | 93 | ||
| 94 | + repo: "Repo" | ||
| 95 | + """Repository to operate on. Must be provided by subclass or sibling class.""" | ||
| 96 | + | ||
| 94 | 97 | class Index: | |
| 95 | 98 | """Stand-in indicating you want to diff against the index.""" | |
| 96 | 99 | ||
@@ -169,9 +172,6 @@ def diff( | |||
| 169 | 172 | if paths is not None and not isinstance(paths, (tuple, list)): | |
| 170 | 173 | paths = [paths] | |
| 171 | 174 | ||
| 172 | - if hasattr(self, "Has_Repo"): | ||
| 173 | - self.repo: "Repo" = self.repo | ||
| 174 | - | ||
| 175 | 175 | diff_cmd = self.repo.git.diff | |
| 176 | 176 | if other is self.Index: | |
| 177 | 177 | args.insert(0, "--cached") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments