Fossil SCM
Add the global --comment-format command-line option as an alias for --comfmtflags.
Commit
a0d10b91f70801b5615989e3c498b826f481d8688fd738ffed3b8a3dc605f0e5
Parent
bc62fa1710a9d1d…
5 files changed
+1
-1
+3
-1
+1
+3
+2
-1
+1
-1
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -520,11 +520,11 @@ | ||
| 520 | 520 | |
| 521 | 521 | /* |
| 522 | 522 | ** Return the "COMMENT_PRINT_*" flags specified by the following sources, |
| 523 | 523 | ** evaluated in the following cascading order: |
| 524 | 524 | ** |
| 525 | -** 1. The global --comfmtflags command-line option. | |
| 525 | +** 1. The global --comfmtflags (alias --comment-format) command-line option. | |
| 526 | 526 | ** 2. The local (per-repository) "comment-format" setting. |
| 527 | 527 | ** 3. The global (all-repositories) "comment-format" setting. |
| 528 | 528 | ** 4. The default value COMMENT_PRINT_DEFAULT. |
| 529 | 529 | */ |
| 530 | 530 | int get_comment_format(){ |
| 531 | 531 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -520,11 +520,11 @@ | |
| 520 | |
| 521 | /* |
| 522 | ** Return the "COMMENT_PRINT_*" flags specified by the following sources, |
| 523 | ** evaluated in the following cascading order: |
| 524 | ** |
| 525 | ** 1. The global --comfmtflags command-line option. |
| 526 | ** 2. The local (per-repository) "comment-format" setting. |
| 527 | ** 3. The global (all-repositories) "comment-format" setting. |
| 528 | ** 4. The default value COMMENT_PRINT_DEFAULT. |
| 529 | */ |
| 530 | int get_comment_format(){ |
| 531 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -520,11 +520,11 @@ | |
| 520 | |
| 521 | /* |
| 522 | ** Return the "COMMENT_PRINT_*" flags specified by the following sources, |
| 523 | ** evaluated in the following cascading order: |
| 524 | ** |
| 525 | ** 1. The global --comfmtflags (alias --comment-format) command-line option. |
| 526 | ** 2. The local (per-repository) "comment-format" setting. |
| 527 | ** 3. The global (all-repositories) "comment-format" setting. |
| 528 | ** 4. The default value COMMENT_PRINT_DEFAULT. |
| 529 | */ |
| 530 | int get_comment_format(){ |
| 531 |
M
src/db.c
+3
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3172,11 +3172,13 @@ | ||
| 3172 | 3172 | ** with gpg. When disabled, commits will be unsigned. |
| 3173 | 3173 | */ |
| 3174 | 3174 | /* |
| 3175 | 3175 | ** SETTING: comment-format width=16 default=1 |
| 3176 | 3176 | ** Set the default options for printing timeline comments to the console. |
| 3177 | -** The global --comfmtflags command-line option overrides this setting. | |
| 3177 | +** | |
| 3178 | +** The global --comfmtflags command-line option (or alias --comment-format) | |
| 3179 | +** overrides this setting. | |
| 3178 | 3180 | ** |
| 3179 | 3181 | ** Possible values are: |
| 3180 | 3182 | ** 1 Activate the legacy comment printing format (default). |
| 3181 | 3183 | ** |
| 3182 | 3184 | ** Or a bitwise combination of the following flags: |
| 3183 | 3185 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3172,11 +3172,13 @@ | |
| 3172 | ** with gpg. When disabled, commits will be unsigned. |
| 3173 | */ |
| 3174 | /* |
| 3175 | ** SETTING: comment-format width=16 default=1 |
| 3176 | ** Set the default options for printing timeline comments to the console. |
| 3177 | ** The global --comfmtflags command-line option overrides this setting. |
| 3178 | ** |
| 3179 | ** Possible values are: |
| 3180 | ** 1 Activate the legacy comment printing format (default). |
| 3181 | ** |
| 3182 | ** Or a bitwise combination of the following flags: |
| 3183 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3172,11 +3172,13 @@ | |
| 3172 | ** with gpg. When disabled, commits will be unsigned. |
| 3173 | */ |
| 3174 | /* |
| 3175 | ** SETTING: comment-format width=16 default=1 |
| 3176 | ** Set the default options for printing timeline comments to the console. |
| 3177 | ** |
| 3178 | ** The global --comfmtflags command-line option (or alias --comment-format) |
| 3179 | ** overrides this setting. |
| 3180 | ** |
| 3181 | ** Possible values are: |
| 3182 | ** 1 Activate the legacy comment printing format (default). |
| 3183 | ** |
| 3184 | ** Or a bitwise combination of the following flags: |
| 3185 |
+1
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -501,10 +501,11 @@ | ||
| 501 | 501 | @ Command-line options common to all commands: |
| 502 | 502 | @ |
| 503 | 503 | @ --args FILENAME Read additional arguments and options from FILENAME |
| 504 | 504 | @ --cgitrace Active CGI tracing |
| 505 | 505 | @ --comfmtflags VALUE Set comment formatting flags to VALUE |
| 506 | +@ --comment-format VALUE Alias for --comfmtflags | |
| 506 | 507 | @ --errorlog FILENAME Log errors to FILENAME |
| 507 | 508 | @ --help Show help on the command rather than running it |
| 508 | 509 | @ --httptrace Trace outbound HTTP requests |
| 509 | 510 | @ --localtime Display times using the local timezone |
| 510 | 511 | @ --no-th-hook Do not run TH1 hooks |
| 511 | 512 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -501,10 +501,11 @@ | |
| 501 | @ Command-line options common to all commands: |
| 502 | @ |
| 503 | @ --args FILENAME Read additional arguments and options from FILENAME |
| 504 | @ --cgitrace Active CGI tracing |
| 505 | @ --comfmtflags VALUE Set comment formatting flags to VALUE |
| 506 | @ --errorlog FILENAME Log errors to FILENAME |
| 507 | @ --help Show help on the command rather than running it |
| 508 | @ --httptrace Trace outbound HTTP requests |
| 509 | @ --localtime Display times using the local timezone |
| 510 | @ --no-th-hook Do not run TH1 hooks |
| 511 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -501,10 +501,11 @@ | |
| 501 | @ Command-line options common to all commands: |
| 502 | @ |
| 503 | @ --args FILENAME Read additional arguments and options from FILENAME |
| 504 | @ --cgitrace Active CGI tracing |
| 505 | @ --comfmtflags VALUE Set comment formatting flags to VALUE |
| 506 | @ --comment-format VALUE Alias for --comfmtflags |
| 507 | @ --errorlog FILENAME Log errors to FILENAME |
| 508 | @ --help Show help on the command rather than running it |
| 509 | @ --httptrace Trace outbound HTTP requests |
| 510 | @ --localtime Display times using the local timezone |
| 511 | @ --no-th-hook Do not run TH1 hooks |
| 512 |
+3
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -576,10 +576,13 @@ | ||
| 576 | 576 | ** this function executes, all global variables (i.e. in the "g" struct) |
| 577 | 577 | ** containing option-settable bitwise flag fields must be initialized. |
| 578 | 578 | */ |
| 579 | 579 | static void fossil_init_flags_from_options(void){ |
| 580 | 580 | const char *zValue = find_option("comfmtflags", 0, 1); |
| 581 | + if( zValue==0 ){ | |
| 582 | + zValue = find_option("comment-format", 0, 1); | |
| 583 | + } | |
| 581 | 584 | if( zValue ){ |
| 582 | 585 | g.comFmtFlags = atoi(zValue); |
| 583 | 586 | }else{ |
| 584 | 587 | g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */ |
| 585 | 588 | } |
| 586 | 589 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -576,10 +576,13 @@ | |
| 576 | ** this function executes, all global variables (i.e. in the "g" struct) |
| 577 | ** containing option-settable bitwise flag fields must be initialized. |
| 578 | */ |
| 579 | static void fossil_init_flags_from_options(void){ |
| 580 | const char *zValue = find_option("comfmtflags", 0, 1); |
| 581 | if( zValue ){ |
| 582 | g.comFmtFlags = atoi(zValue); |
| 583 | }else{ |
| 584 | g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */ |
| 585 | } |
| 586 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -576,10 +576,13 @@ | |
| 576 | ** this function executes, all global variables (i.e. in the "g" struct) |
| 577 | ** containing option-settable bitwise flag fields must be initialized. |
| 578 | */ |
| 579 | static void fossil_init_flags_from_options(void){ |
| 580 | const char *zValue = find_option("comfmtflags", 0, 1); |
| 581 | if( zValue==0 ){ |
| 582 | zValue = find_option("comment-format", 0, 1); |
| 583 | } |
| 584 | if( zValue ){ |
| 585 | g.comFmtFlags = atoi(zValue); |
| 586 | }else{ |
| 587 | g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */ |
| 588 | } |
| 589 |
+2
-1
| --- www/env-opts.md | ||
| +++ www/env-opts.md | ||
| @@ -31,11 +31,12 @@ | ||
| 31 | 31 | |
| 32 | 32 | `--chdir DIRECTORY`: Change to the named directory before processing |
| 33 | 33 | any commands. |
| 34 | 34 | |
| 35 | 35 | |
| 36 | -`--comfmtflags NUMBER`: Specify flags that control how check-in comments | |
| 36 | +`--comfmtflags NUMBER` | |
| 37 | +`--comment-format NUMBER`: Specify flags that control how check-in comments | |
| 37 | 38 | and certain other text outputs are formatted for display. The flags are |
| 38 | 39 | individual bits in `NUMBER`, which must be specified in base 10: |
| 39 | 40 | |
| 40 | 41 | * _0_ — Uses the revised algorithm with no special handling. |
| 41 | 42 | |
| 42 | 43 |
| --- www/env-opts.md | |
| +++ www/env-opts.md | |
| @@ -31,11 +31,12 @@ | |
| 31 | |
| 32 | `--chdir DIRECTORY`: Change to the named directory before processing |
| 33 | any commands. |
| 34 | |
| 35 | |
| 36 | `--comfmtflags NUMBER`: Specify flags that control how check-in comments |
| 37 | and certain other text outputs are formatted for display. The flags are |
| 38 | individual bits in `NUMBER`, which must be specified in base 10: |
| 39 | |
| 40 | * _0_ — Uses the revised algorithm with no special handling. |
| 41 | |
| 42 |
| --- www/env-opts.md | |
| +++ www/env-opts.md | |
| @@ -31,11 +31,12 @@ | |
| 31 | |
| 32 | `--chdir DIRECTORY`: Change to the named directory before processing |
| 33 | any commands. |
| 34 | |
| 35 | |
| 36 | `--comfmtflags NUMBER` |
| 37 | `--comment-format NUMBER`: Specify flags that control how check-in comments |
| 38 | and certain other text outputs are formatted for display. The flags are |
| 39 | individual bits in `NUMBER`, which must be specified in base 10: |
| 40 | |
| 41 | * _0_ — Uses the revised algorithm with no special handling. |
| 42 | |
| 43 |