# # # patch "date_format.hh" # from [e77f30981669d8a03057c9bc90eeb4c74c575a44] # to [2100f7a1854afa9573d3991e41bbdc36f75c7e5b] # # patch "options_list.hh" # from [05dd95761e6fa1268a22ba28cda146765d6246b1] # to [519be4e41ccf05254e1280dd6b876cd95a017683] # ============================================================ --- date_format.hh e77f30981669d8a03057c9bc90eeb4c74c575a44 +++ date_format.hh 2100f7a1854afa9573d3991e41bbdc36f75c7e5b @@ -21,7 +21,7 @@ get_date_format(options const & opts, date_format_spec spec) { std::string date_fmt; - if (opts.format_dates) + if (!opts.no_format_dates) { if (!opts.date_fmt.empty()) date_fmt = opts.date_fmt; ============================================================ --- options_list.hh 05dd95761e6fa1268a22ba28cda146765d6246b1 +++ options_list.hh 519be4e41ccf05254e1280dd6b876cd95a017683 @@ -135,11 +135,14 @@ void set_simple_option(std::set * (with push_back or insert), and the collection will be empty if the * option is not given or is reset. */ +#define GROUPED_SIMPLE_OPTION(group, name, optstring, type, description) \ + OPTVAR(group, type, name, ) \ + OPTION(group, name, has_arg(), optstring, description) \ + SIMPLE_OPTION_BODY(name) + #define SIMPLE_OPTION(name, optstring, type, description) \ OPTSET(name) \ - OPTVAR(name, type, name, ) \ - OPTION(name, name, has_arg(), optstring, description) \ - SIMPLE_OPTION_BODY(name) + GROUPED_SIMPLE_OPTION(name, name, optstring, type, description) // Like SIMPLE_OPTION, but the declared option is a member of the globals #define GLOBAL_SIMPLE_OPTION(name, optstring, type, description) \ @@ -282,18 +285,16 @@ OPT(date, "date", date_t, , } #endif -GLOBAL_SIMPLE_OPTION(date_fmt, "date-format/default-date-format", std::string, - gettext_noop("strftime(3) format specification for printing dates")) +OPTSET(date_formats) +OPTSET_REL(globals, date_formats) +GROUPED_SIMPLE_OPTION(date_formats, date_fmt, + "date-format/default-date-format", std::string, + gettext_noop("strftime(3) format specification for printing dates")) +GROUPED_SIMPLE_OPTION(date_formats, no_format_dates, + "no-format-dates", bool, + gettext_noop("print date certs exactly as stored in the database")) -GOPT(format_dates, "no-format-dates", bool, true, - gettext_noop("print date certs exactly as stored in the database")) -#ifdef option_bodies -{ - format_dates = false; -} -#endif - OPTVAR(globals, db_type, dbname_type, ); OPTVAR(globals, std::string, dbname_alias, ); GOPT(dbname, "db,d", system_path, , gettext_noop("set name of database")) @@ -441,7 +442,6 @@ OPTION(exclude, exclude, true, "exclude" exclude_patterns.push_back(arg_type(arg, origin::user)); } #endif - OPT(bookkeep_only, "bookkeep-only", bool, false, gettext_noop("only update monotone's internal bookkeeping, not the filesystem")) #ifdef option_bodies