diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2011-09-15 23:10:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-05 13:45:30 -0700 |
commit | 7e9d2fe96060957d90870d2fac9b85608423e277 (patch) | |
tree | dc68fe7286d63488a9a9a0115554b7ac75a16e41 /t/t1402-check-ref-format.sh | |
parent | 49295d4e3fb58c6179b7434cd87805f86cb1f7b7 (diff) | |
download | git-7e9d2fe96060957d90870d2fac9b85608423e277.tar.gz |
Do not allow ".lock" at the end of any refname component
Allowing any refname component to end with ".lock" is looking for
trouble; for example,
$ git br foo.lock/bar
$ git br foo
fatal: Unable to create '[...]/.git/refs/heads/foo.lock': File exists.
Therefore, do not allow any refname component to end with ".lock".
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1402-check-ref-format.sh')
-rwxr-xr-x | t/t1402-check-ref-format.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t1402-check-ref-format.sh b/t/t1402-check-ref-format.sh index 1cad88f2dc..419788f78f 100755 --- a/t/t1402-check-ref-format.sh +++ b/t/t1402-check-ref-format.sh @@ -43,8 +43,8 @@ invalid_ref 'heads/foo?bar' valid_ref 'foo./bar' invalid_ref 'heads/foo.lock' invalid_ref 'heads///foo.lock' -valid_ref 'foo.lock/bar' -valid_ref 'foo.lock///bar' +invalid_ref 'foo.lock/bar' +invalid_ref 'foo.lock///bar' valid_ref 'heads/foo@bar' invalid_ref 'heads/v@{ation' invalid_ref 'heads/foo\bar' @@ -160,7 +160,7 @@ invalid_ref_normalized 'heads/./foo' invalid_ref_normalized 'heads\foo' invalid_ref_normalized 'heads/foo.lock' invalid_ref_normalized 'heads///foo.lock' -valid_ref_normalized 'foo.lock/bar' 'foo.lock/bar' -valid_ref_normalized 'foo.lock///bar' 'foo.lock/bar' +invalid_ref_normalized 'foo.lock/bar' +invalid_ref_normalized 'foo.lock///bar' test_done |