summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c
index 113cadad5..dd3dd64b1 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1667,6 +1667,9 @@ int git_reference__normalize_name(
process_flags = flags;
current = (char *)name;
+ if (*current == '/')
+ goto cleanup;
+
if (normalize)
git_buf_clear(buf);