Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/38#discussion_r25356693
  
    --- Diff: src/couch_server.erl ---
    @@ -145,6 +150,8 @@ maybe_add_sys_db_callbacks(DbName, Options) ->
     path_ends_with(Path, Suffix) ->
         Suffix == lists:last(binary:split(mem3:dbname(Path), <<"/">>, 
[global])).
     
    +check_dbname(#server{dbname_validator={M, F, A}}, DbName) ->
    +    M:F(DbName, A);
     check_dbname(#server{dbname_regexp=RegExp}, DbName) ->
    --- End diff --
    
    Why do we have to maintain two different ways to apply dbname validation 
logic (MFA vs regex)? May be drop dbname_regexp and replace it with the default 
MFA which points to the original check_dbname? Would be a bit more consistent.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to