Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: [PATCH] Do not allow refnames to start with a slash

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:55

Possibly related (same subject, not in this thread)

Michael Haggerty [off-list ref] writes:
quoted hunk
diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh
index 1b0f82f..b05ca26 100755
--- a/t/t1402-check-ref-format.sh
+++ b/t/t1402-check-ref-format.sh
@@ -18,6 +18,10 @@ invalid_ref 'foo'
 valid_ref 'foo/bar/baz'
 valid_ref 'refs///heads/foo'
 invalid_ref 'heads/foo/'
+invalid_ref '/foo'
+invalid_ref '/foo/bar'
As refs///heads/foo is defined to be valid_ref, I am moderately against
this change, which can break existing scripts.
+invalid_ref 'foo/'
+invalid_ref 'foo/bar/'
We already check trailing slash in existing checks, so I do not see a
point in these two additional lines.
 invalid_ref './foo'
 invalid_ref '.refs/foo'
 invalid_ref 'heads/foo..bar'
I was about to write "other than that the patch looks good", but then
realized there is nothing remaining after rejecting the new "now slash
cannot come at the beginning".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help