summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-09-15 21:10:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-05 20:45:30 (GMT)
commit7e9d2fe96060957d90870d2fac9b85608423e277 (patch)
treedc68fe7286d63488a9a9a0115554b7ac75a16e41 /Documentation
parent49295d4e3fb58c6179b7434cd87805f86cb1f7b7 (diff)
downloadgit-7e9d2fe96060957d90870d2fac9b85608423e277.zip
git-7e9d2fe96060957d90870d2fac9b85608423e277.tar.gz
git-7e9d2fe96060957d90870d2fac9b85608423e277.tar.bz2
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 'Documentation')
-rw-r--r--Documentation/git-check-ref-format.txt4
1 files changed, 1 insertions, 3 deletions
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index dcb8cc3..9114751 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -28,7 +28,7 @@ git imposes the following rules on how references are named:
. They can include slash `/` for hierarchical (directory)
grouping, but no slash-separated component can begin with a
- dot `.`.
+ dot `.` or end with the sequence `.lock`.
. They must contain at least one `/`. This enforces the presence of a
category like `heads/`, `tags/` etc. but the actual names are not
@@ -47,8 +47,6 @@ git imposes the following rules on how references are named:
. They cannot end with a slash `/` nor a dot `.`.
-. They cannot end with the sequence `.lock`.
-
. They cannot contain a sequence `@{`.
. They cannot contain a `\`.