summaryrefslogtreecommitdiff
path: root/Documentation/git-check-ref-format.txt
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2009-03-24 23:31:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-25 00:02:20 (GMT)
commit3e262b95c50991de12cc5e180b72256561606a19 (patch)
treeaffb5e2c4e3fd692d75a999875fe7627a1b84feb /Documentation/git-check-ref-format.txt
parentcbdffe4093be77bbb1408e54eead7865dd3bc33f (diff)
downloadgit-3e262b95c50991de12cc5e180b72256561606a19.zip
git-3e262b95c50991de12cc5e180b72256561606a19.tar.gz
git-3e262b95c50991de12cc5e180b72256561606a19.tar.bz2
Don't permit ref/branch names to end with ".lock"
We already skip over loose refs under $GIT_DIR/refs if the name ends with ".lock", so creating a branch named "foo.lock" will not appear in the output of "git branch", "git for-each-ref", nor will its commit be considered reachable by "git rev-list --all". In the latter case this is especially evil, as it may cause repository corruption when objects reachable only through such a ref are deleted by "git prune". It should be reasonably safe to deny use of ".lock" as a ref suffix. In prior versions of Git such branches would be "phantom branches"; you can create it, but you can't see it in "git branch" output. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-check-ref-format.txt')
-rw-r--r--Documentation/git-check-ref-format.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index d23fd21..9b707a7 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -34,6 +34,8 @@ imposes the following rules on how refs are named:
. They cannot end with a slash `/` nor a dot `.`.
+. They cannot end with the sequence `.lock`.
+
. They cannot contain a sequence `@{`.
These rules makes it easy for shell script based tools to parse