diff options
-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) |