Commits

Christian Hudon committed 582a6fd

Don't assume that the options_t is the same for all vcs being probed.

  • Participants
  • Parent commits 83d1e0a

Comments (0)

Files changed (3)

File src/common.c

     free(result);
 }
 
-static options_t* _options = NULL;
+static int _debug = 0;
 
-void set_options(options_t* options)
+void set_debug(options_t* options)
 {
-    _options = options;
+    _debug = options->debug;
 }
 
 int result_set_revision(result_t* result, const char *revision, int len)
 {
     va_list args;
 
-    if (!_options->debug)
+    if (!_debug)
         return;
 
     va_start(args, fmt);

File src/common.h

 };
 
 void
-set_options(options_t*);
+set_debug(options_t*);
 vccontext_t*
 init_context(const char *name,
              options_t* options,

File src/vcprompt.c

 
     parse_args(argc, argv, &options);
     parse_format(&options);
-    set_options(&options);
+    set_debug(&options);
 
     vccontext_t* contexts[] = {
         get_cvs_context(&options),