summaryrefslogtreecommitdiff
path: root/lib/git/refs.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git/refs.py')
-rw-r--r--lib/git/refs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/git/refs.py b/lib/git/refs.py
index 9b089a25..cea3e720 100644
--- a/lib/git/refs.py
+++ b/lib/git/refs.py
@@ -167,6 +167,9 @@ class Reference(LazyMixin, Iterable):
Instance of type Reference, Head, Tag, SymbolicReference or HEAD
depending on the given path
"""
+ if not path:
+ raise ValueError("Cannot create Reference from %r" % path)
+
if path == 'HEAD':
return HEAD(repo, path)