Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add the global --comment-format command-line option as an alias for --comfmtflags. |
|---|---|
| Timelines: | family | ancestors | descendants | both | comment-format-setting |
| Files: | files | file ages | folders |
| SHA3-256: |
a0d10b91f70801b5615989e3c498b826 |
| User & Date: | florian 2019-01-27 15:38:00.000 |
Context
|
2019-01-27
| ||
| 19:16 | Add the global --comment-format command-line option and the "comment-format" setting for controlling the display of the command-line timeline. check-in: 2476b8121e user: drh tags: trunk | |
| 15:38 | Add the global --comment-format command-line option as an alias for --comfmtflags. Closed-Leaf check-in: a0d10b91f7 user: florian tags: comment-format-setting | |
| 15:35 | Add the "comment-format" setting to set the default options for printing timeline comments to the console, as discussed here: https://fossil-scm.org/forum/forumpost/d9954370c7. check-in: bc62fa1710 user: florian tags: comment-format-setting | |
Changes
Changes to src/comformat.c.
| ︙ | ︙ | |||
518 519 520 521 522 523 524 | return lineCnt; } /* ** Return the "COMMENT_PRINT_*" flags specified by the following sources, ** evaluated in the following cascading order: ** | | | 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
return lineCnt;
}
/*
** Return the "COMMENT_PRINT_*" flags specified by the following sources,
** evaluated in the following cascading order:
**
** 1. The global --comfmtflags (alias --comment-format) command-line option.
** 2. The local (per-repository) "comment-format" setting.
** 3. The global (all-repositories) "comment-format" setting.
** 4. The default value COMMENT_PRINT_DEFAULT.
*/
int get_comment_format(){
int comFmtFlags;
/* The global command-line option is present, or the value has been cached. */
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
3170 3171 3172 3173 3174 3175 3176 | ** SETTING: clearsign boolean default=off ** When enabled, fossil will attempt to sign all commits ** with gpg. When disabled, commits will be unsigned. */ /* ** SETTING: comment-format width=16 default=1 ** Set the default options for printing timeline comments to the console. | > | > | 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 | ** SETTING: clearsign boolean default=off ** When enabled, fossil will attempt to sign all commits ** with gpg. When disabled, commits will be unsigned. */ /* ** SETTING: comment-format width=16 default=1 ** Set the default options for printing timeline comments to the console. ** ** The global --comfmtflags command-line option (or alias --comment-format) ** overrides this setting. ** ** Possible values are: ** 1 Activate the legacy comment printing format (default). ** ** Or a bitwise combination of the following flags: ** 0 Activate the newer (non-legacy) comment printing format. ** 2 Trim leading and trailing CR and LF characters. |
| ︙ | ︙ |
Changes to src/dispatch.c.
| ︙ | ︙ | |||
499 500 501 502 503 504 505 506 507 508 509 510 511 512 | /* @-comment: # */ static const char zOptions[] = @ Command-line options common to all commands: @ @ --args FILENAME Read additional arguments and options from FILENAME @ --cgitrace Active CGI tracing @ --comfmtflags VALUE Set comment formatting flags to VALUE @ --errorlog FILENAME Log errors to FILENAME @ --help Show help on the command rather than running it @ --httptrace Trace outbound HTTP requests @ --localtime Display times using the local timezone @ --no-th-hook Do not run TH1 hooks @ --quiet Reduce the amount of output @ --sqlstats Show SQL usage statistics when done | > | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | /* @-comment: # */ static const char zOptions[] = @ Command-line options common to all commands: @ @ --args FILENAME Read additional arguments and options from FILENAME @ --cgitrace Active CGI tracing @ --comfmtflags VALUE Set comment formatting flags to VALUE @ --comment-format VALUE Alias for --comfmtflags @ --errorlog FILENAME Log errors to FILENAME @ --help Show help on the command rather than running it @ --httptrace Trace outbound HTTP requests @ --localtime Display times using the local timezone @ --no-th-hook Do not run TH1 hooks @ --quiet Reduce the amount of output @ --sqlstats Show SQL usage statistics when done |
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
** This function attempts to find command line options known to contain
** bitwise flags and initializes the associated global variables. After
** this function executes, all global variables (i.e. in the "g" struct)
** containing option-settable bitwise flag fields must be initialized.
*/
static void fossil_init_flags_from_options(void){
const char *zValue = find_option("comfmtflags", 0, 1);
if( zValue ){
g.comFmtFlags = atoi(zValue);
}else{
g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
}
}
| > > > | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
** This function attempts to find command line options known to contain
** bitwise flags and initializes the associated global variables. After
** this function executes, all global variables (i.e. in the "g" struct)
** containing option-settable bitwise flag fields must be initialized.
*/
static void fossil_init_flags_from_options(void){
const char *zValue = find_option("comfmtflags", 0, 1);
if( zValue==0 ){
zValue = find_option("comment-format", 0, 1);
}
if( zValue ){
g.comFmtFlags = atoi(zValue);
}else{
g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
}
}
|
| ︙ | ︙ |
Changes to www/env-opts.md.
| ︙ | ︙ | |||
29 30 31 32 33 34 35 | global setting should be used to force the case sensitivity to the most sensible condition. `--chdir DIRECTORY`: Change to the named directory before processing any commands. | > | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | global setting should be used to force the case sensitivity to the most sensible condition. `--chdir DIRECTORY`: Change to the named directory before processing any commands. `--comfmtflags NUMBER` `--comment-format NUMBER`: Specify flags that control how check-in comments and certain other text outputs are formatted for display. The flags are individual bits in `NUMBER`, which must be specified in base 10: * _0_ — Uses the revised algorithm with no special handling. * _1_ — Uses the legacy algorithm, other flags are ignored. |
| ︙ | ︙ |