Skip to content

Commit 35057c5

Browse files
committed
repo: Added alias for refs property, which is called 'references' , to improve usability. There was no reason that only 'refs' is shortened, whereas there are 'heads' and 'tags' as well
1 parent 6a417f4 commit 35057c5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/git/repo.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,19 @@ def heads(self):
178178
return Head.list_items(self)
179179

180180
@property
181-
def refs(self):
181+
def references(self):
182182
"""
183183
A list of Reference objects representing tags, heads and remote references.
184184
185185
Returns
186186
IterableList(Reference, ...)
187187
"""
188188
return Reference.list_items(self)
189+
190+
# alias for references
191+
refs = references
189192

190-
# alias heads
193+
# alias for heads
191194
branches = heads
192195

193196
@property

0 commit comments

Comments
 (0)