Thread (14 messages) flat view 14 messages, 1 author, 2016-06-15

[RFC 06/13] strbuf_check_branch_ref(): use check_refname_format(..., REFNAME_FULL)

From: <hidden>
Date: 2016-06-15 22:52:18
Subsystem: the rest · Maintainer: Linus Torvalds

From: Michael Haggerty <redacted>

The reference name should be a full one, so adjust the check
accordingly.

Signed-off-by: Michael Haggerty <redacted>
---
 sha1_name.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sha1_name.c b/sha1_name.c
index 03ffc2c..335da37 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -883,7 +883,7 @@ int strbuf_check_branch_ref(struct strbuf *sb, const char *name)
 	if (name[0] == '-')
 		return -1;
 	strbuf_splice(sb, 0, 0, "refs/heads/", 11);
-	return check_refname_format(sb->buf, 0);
+	return check_refname_format(sb->buf, REFNAME_FULL);
 }
 
 /*
-- 
1.7.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help