From 7e9d2fe96060957d90870d2fac9b85608423e277 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Thu, 15 Sep 2011 23:10:27 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-check-ref-format.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Documentation/git-check-ref-format.txt') diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index dcb8cc38a3..9114751966 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 `\`. -- cgit v1.2.1