]> oss.titaniummirror.com Git - repo_shell.git/commitdiff
No need for sections in repo_shell.cfg
authorR. Steve McKown <rsmckown@gmail.com>
Fri, 28 Sep 2012 04:37:37 +0000 (22:37 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Fri, 28 Sep 2012 04:37:37 +0000 (22:37 -0600)
README
repo_shell.c

diff --git a/README b/README
index b20c859eeac5465ccf3a8788723568e2e5b42d82..5226c0e9375de1af42f67cae13a0325841256b4d 100644 (file)
--- a/README
+++ b/README
@@ -36,7 +36,6 @@ To install repo_shell:
 
 The /etc/repo_shell.cfg configuration file is straightforward:
 
-    [core]
     owner=repo
     git_root=/var/lib/git
     svn_root=/var/lib/svn/repositories
@@ -85,9 +84,9 @@ svnserve.conf set a global authz.conf file, using the standard hooks and
 activating svnperms.conf for branch-based commit control.  These are suggestions
 outside the scope of the repo_shell program itself.
 
-Access controls for git repositories uses a feature built-into repo_shell.
-The /etc/repo_shell.cfg file lists a core parameter git_acl_file, which
-should be set to the name of the git acl file.  A recommended name is
-/var/lib/git/.gitacls, with permissions 0400.  See git_acl.cfg.example for
-information on the format of this file, which is similar in concept, but
-different, than subversion's authz.conf file format.
+Access controls for git repositories uses a feature built-into repo_shell.  The
+/etc/repo_shell.cfg file lists a parameter git_acl_file, which should be set to
+the name of the git acl file.  A recommended name is /var/lib/git/.gitacls, with
+permissions 0400.  See git_acl.cfg.example for information on the format of this
+file, which is similar in concept, but different, than subversion's authz.conf
+file format.
index 24eb6e20adbdb3e19dde2767aca372ed6a8ac05a..9d775593d7b3f039a0a62ddad71be41e0bd2f939 100644 (file)
@@ -153,14 +153,13 @@ static int ini_handler(void* user, const char* section, const char* name,
 {
   cfg_t* pconfig = (cfg_t*)user;
 
-  #define MATCH(s, n) strcmp(section, s) == 0 && strcmp(name, n) == 0
-  if (MATCH("core", "svn_root"))
+  if (!strcmp(name, "svn_root"))
     pconfig->svn_root = xstrdup(value);
-  else if (MATCH("core", "git_root"))
+  else if (!strcmp(name, "git_root"))
     pconfig->git_root = xstrdup(value);
-  else if (MATCH("core", "owner"))
+  else if (!strcmp(name, "owner"))
     pconfig->owner = xstrdup(value);
-  else if (MATCH("core", "git_acl_file"))
+  else if (!strcmp(name, "git_acl_file"))
     pconfig->git_acl_file = xstrdup(value);
   else
     return 0;  /* unknown section/name, error */