Skip to content

Commit 252db0d

Browse files
authored
Update symbolic.py
1 parent 49ea98a commit 252db0d

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

git/refs/symbolic.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
2+
import os.path as osp
33
from git.compat import defenc
44
from git.objects import Object
55
from git.objects.commit import Commit
@@ -373,19 +373,7 @@ def reference(self) -> Union['Head', 'RemoteReference', 'TagReference', 'Referen
373373
def reference(self, ref: Union[str, Commit_ish, 'SymbolicReference'], logmsg: Union[str, None] = None
374374
) -> 'SymbolicReference':
375375
return self.set_reference(ref=ref, logmsg=logmsg)
376-
377-
def is_valid(self) -> bool:
378-
"""
379-
:return:
380-
True if the reference is valid, hence it can be read and points to
381-
a valid object or reference."""
382-
try:
383-
self.object
384-
except (OSError, ValueError):
385-
return False
386-
else:
387-
return True
388-
376+
389377
@ property
390378
def is_detached(self):
391379
"""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy