summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2014-04-04 09:32:00 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2014-04-04 09:32:00 +0100
commitfd908026c2d12ac83c51fe9ed57c3316230ea105 (patch)
treeff343b6bc7487741367cfa779065207145923399
parent69085b691188bdb6d1345eeaeb94f0f3f1506f70 (diff)
downloadgitano-fd908026c2d12ac83c51fe9ed57c3316230ea105.tar.gz
Support rsync directly to subdirectories
-rw-r--r--plugins/rsync.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/rsync.lua b/plugins/rsync.lua
index 310fe59..8f8c8da 100644
--- a/plugins/rsync.lua
+++ b/plugins/rsync.lua
@@ -39,9 +39,10 @@ local function rsync_detect_repo(config, cmdline)
-- Basically, while there's still something to the repopath
-- and we've not yet found a repo, strip an element and try again...
- while not repo and repopath ~= ""do
+ while (not repo or repo.is_nascent) and repopath ~= ""do
+ gitano.log.error("Trying " .. repopath)
repo, msg = gitano.repository.find(config, repopath)
- if not repo then
+ if not repo or repo.is_nascent then
repopath = repopath:match("^(.*)/[^/]*$") or ""
end
end