summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2017-04-08 15:53:24 +0100
committerRichard Maw <richard.maw@gmail.com>2017-04-08 15:53:24 +0100
commitd2d522da024c59bd592d7c24d07b1272511766d4 (patch)
treeb014e13614a19852cc9fa3eadcdab2c77db51ac6
parentccc7709f90d3e85121bac8d77f0a13593e4fd52c (diff)
parentec05045e9f29a9cb9f7d1a0a9d38b8b3d13275af (diff)
downloadgitano-d2d522da024c59bd592d7c24d07b1272511766d4.tar.gz
Merge remote-tracking branch 'origin/dsilvers/update-on-create'
-rw-r--r--lib/gitano/repository.lua5
-rw-r--r--testing/02-commands-create.yarn13
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitano/repository.lua b/lib/gitano/repository.lua
index b66c343..b7e2ccc 100644
--- a/lib/gitano/repository.lua
+++ b/lib/gitano/repository.lua
@@ -489,6 +489,11 @@ function repo_method:realise()
self.git = r
self.is_nascent = nil
+ r, msg = self.git:update_server_info()
+ if not r then
+ return false, msg
+ end
+
-- Finally, we're not nascent, validate the repo
return self:run_checks()
end
diff --git a/testing/02-commands-create.yarn b/testing/02-commands-create.yarn
index 2b65fe5..b579e5b 100644
--- a/testing/02-commands-create.yarn
+++ b/testing/02-commands-create.yarn
@@ -25,3 +25,16 @@ comprehensible error message to that effect.
THEN stderr contains CRIT: Repository creation is not permitted.
FINALLY the instance is torn down
+
+When creating a repository, we update the HTTP server information file because
+that way gitweb and the like don't get upset even if nothing has been pushed,
+and HTTP smart access can be permitted, which might be necessary for the push
+in the first place.
+
+ SCENARIO created repositories have server info
+
+ GIVEN a standard instance
+
+ WHEN testinstance adminkey runs create foobar
+ THEN server-side foobar.git file objects/info/packs exists
+ AND server-side foobar.git file info/refs exists