diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-22 18:23:45 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-22 18:23:45 +0100 |
commit | 5bd2e73ac8911372ff7abffb491566f6fd5c9b1c (patch) | |
tree | 4e77ae7b68601e1eb37672ae978407b99645c844 /lib/gitano/command.lua | |
parent | a29bdae7370621af3c13a60bb89041551717115c (diff) | |
download | gitano-5bd2e73ac8911372ff7abffb491566f6fd5c9b1c.tar.gz |
COMMANDS: nascent repositories should not be pushed or pulled
Diffstat (limited to 'lib/gitano/command.lua')
-rw-r--r-- | lib/gitano/command.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitano/command.lua b/lib/gitano/command.lua index 29bb711..bc6ce26 100644 --- a/lib/gitano/command.lua +++ b/lib/gitano/command.lua @@ -157,6 +157,9 @@ local function builtin_upload_pack_validate(config, repo, cmdline) end local function builtin_upload_pack_prep(config, repo, cmdline, context) + if repo.is_nascent then + return "deny", "Repository " .. repo.name .. " does not exist" + end -- git-upload-pack is always a read operation context.operation = "read" return repo:run_lace(context) @@ -185,6 +188,9 @@ local function builtin_receive_pack_validate(config, repo, cmdline) end local function builtin_receive_pack_prep(config, repo, cmdline, context) + if repo.is_nascent then + return "deny", "Repository " .. repo.name .. " does not exist" + end -- git-receive-pack is always a simple write operation context.operation = "write" return repo:run_lace(context) |