Fossil SCM

Add the global --comment-format command-line option as an alias for --comfmtflags.

florian 2019-01-27 15:38 comment-format-setting
Commit a0d10b91f70801b5615989e3c498b826f481d8688fd738ffed3b8a3dc605f0e5
+1 -1
--- src/comformat.c
+++ src/comformat.c
@@ -520,11 +520,11 @@
520520
521521
/*
522522
** Return the "COMMENT_PRINT_*" flags specified by the following sources,
523523
** evaluated in the following cascading order:
524524
**
525
-** 1. The global --comfmtflags command-line option.
525
+** 1. The global --comfmtflags (alias --comment-format) command-line option.
526526
** 2. The local (per-repository) "comment-format" setting.
527527
** 3. The global (all-repositories) "comment-format" setting.
528528
** 4. The default value COMMENT_PRINT_DEFAULT.
529529
*/
530530
int get_comment_format(){
531531
--- 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
+3 -1
--- src/db.c
+++ src/db.c
@@ -3172,11 +3172,13 @@
31723172
** with gpg. When disabled, commits will be unsigned.
31733173
*/
31743174
/*
31753175
** SETTING: comment-format width=16 default=1
31763176
** 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.
31783180
**
31793181
** Possible values are:
31803182
** 1 Activate the legacy comment printing format (default).
31813183
**
31823184
** Or a bitwise combination of the following flags:
31833185
--- 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
--- src/dispatch.c
+++ src/dispatch.c
@@ -501,10 +501,11 @@
501501
@ Command-line options common to all commands:
502502
@
503503
@ --args FILENAME Read additional arguments and options from FILENAME
504504
@ --cgitrace Active CGI tracing
505505
@ --comfmtflags VALUE Set comment formatting flags to VALUE
506
+@ --comment-format VALUE Alias for --comfmtflags
506507
@ --errorlog FILENAME Log errors to FILENAME
507508
@ --help Show help on the command rather than running it
508509
@ --httptrace Trace outbound HTTP requests
509510
@ --localtime Display times using the local timezone
510511
@ --no-th-hook Do not run TH1 hooks
511512
--- 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 @@
576576
** this function executes, all global variables (i.e. in the "g" struct)
577577
** containing option-settable bitwise flag fields must be initialized.
578578
*/
579579
static void fossil_init_flags_from_options(void){
580580
const char *zValue = find_option("comfmtflags", 0, 1);
581
+ if( zValue==0 ){
582
+ zValue = find_option("comment-format", 0, 1);
583
+ }
581584
if( zValue ){
582585
g.comFmtFlags = atoi(zValue);
583586
}else{
584587
g.comFmtFlags = COMMENT_PRINT_UNSET; /* Command-line option not found. */
585588
}
586589
--- 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 @@
3131
3232
`--chdir DIRECTORY`: Change to the named directory before processing
3333
any commands.
3434
3535
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
3738
and certain other text outputs are formatted for display. The flags are
3839
individual bits in `NUMBER`, which must be specified in base 10:
3940
4041
* _0_ — Uses the revised algorithm with no special handling.
4142
4243
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button