aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-08-09 17:19:18 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2019-08-09 17:23:54 +0300
commit21da1037ac5b281702480240aa32d983d92b59ec (patch)
tree1f8f78bbffbec7563c1ac3e6342e9e3db27cf19a
parentb28e9d66a4fbddac9c8b8bd81cb939c14a54409b (diff)
downloadvcsync-21da1037ac5b281702480240aa32d983d92b59ec.tar.gz
vcsync-21da1037ac5b281702480240aa32d983d92b59ec.tar.bz2
One more fix
* src/onfig.c (config_finish): Select named configuration based on vcs_type, if given
-rw-r--r--src/config.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/config.c b/src/config.c
index 0916a38..4828f3e 100644
--- a/src/config.c
+++ b/src/config.c
@@ -627,11 +627,15 @@ config_finish(struct grecs_node *tree)
vcs_type = DEFAULT_VCS;
}
if (!config) {
- default_config.vcs_type = (char*)vcs_type;
- default_config.proc = vcs_proc_get(vcs_type);
- if (!default_config.proc)
- die(EX_USAGE, "unknown VCS: %s", vcs_type);
- config = &default_config;
+ config = vcsync_config_lookup_type(vcs_type);
+ if (!config) {
+ default_config.vcs_type = (char*)vcs_type;
+ default_config.proc = vcs_proc_get(vcs_type);
+ if (!default_config.proc)
+ die(EX_USAGE, "unknown VCS: %s",
+ vcs_type);
+ config = &default_config;
+ }
}
}

Return to:

Send suggestions and report system problems to the System administrator.