Fossil SCM
Extend support for the --editor option to "fossil stash save" and "fossil stash snapshot".
Commit
b9f569b2c906ce2899fe27a506f404503e42487a80c9edbfae6479236b0eb9ca
Parent
fab9f0047720721…
2 files changed
+8
-2
+1
+8
-2
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -259,10 +259,11 @@ | ||
| 259 | 259 | const char *zComment; /* Comment to add to the stash */ |
| 260 | 260 | int stashid; /* ID of the new stash */ |
| 261 | 261 | int vid; /* Current check-out */ |
| 262 | 262 | |
| 263 | 263 | zComment = find_option("comment", "m", 1); |
| 264 | + (void)fossil_text_editor(); | |
| 264 | 265 | verify_all_options(); |
| 265 | 266 | if( zComment==0 ){ |
| 266 | 267 | Blob prompt; /* Prompt for stash comment */ |
| 267 | 268 | Blob comment; /* User comment reply */ |
| 268 | 269 | #if defined(_WIN32) || defined(__CYGWIN__) |
| @@ -508,19 +509,24 @@ | ||
| 508 | 509 | ** COMMAND: stash |
| 509 | 510 | ** |
| 510 | 511 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 511 | 512 | ** |
| 512 | 513 | ** > fossil stash |
| 513 | -** > fossil stash save ?-m|--comment COMMENT? ?FILES...? | |
| 514 | -** > fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? | |
| 514 | +** > fossil stash save ?FILES...? | |
| 515 | +** > fossil stash snapshot ?FILES...? | |
| 515 | 516 | ** |
| 516 | 517 | ** Save the current changes in the working tree as a new stash. |
| 517 | 518 | ** Then revert the changes back to the last check-in. If FILES |
| 518 | 519 | ** are listed, then only stash and revert the named files. The |
| 519 | 520 | ** "save" verb can be omitted if and only if there are no other |
| 520 | 521 | ** arguments. The "snapshot" verb works the same as "save" but |
| 521 | 522 | ** omits the revert, keeping the check-out unchanged. |
| 523 | +** | |
| 524 | +** Options: | |
| 525 | +** --editor NAME Use the NAME editor to enter comment | |
| 526 | +** -m|--comment COMMENT Comment text for the new stash | |
| 527 | +** | |
| 522 | 528 | ** |
| 523 | 529 | ** > fossil stash list|ls ?-v|--verbose? ?-W|--width NUM? |
| 524 | 530 | ** |
| 525 | 531 | ** List all changes sets currently stashed. Show information about |
| 526 | 532 | ** individual files in each changeset if -v or --verbose is used. |
| 527 | 533 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -259,10 +259,11 @@ | |
| 259 | const char *zComment; /* Comment to add to the stash */ |
| 260 | int stashid; /* ID of the new stash */ |
| 261 | int vid; /* Current check-out */ |
| 262 | |
| 263 | zComment = find_option("comment", "m", 1); |
| 264 | verify_all_options(); |
| 265 | if( zComment==0 ){ |
| 266 | Blob prompt; /* Prompt for stash comment */ |
| 267 | Blob comment; /* User comment reply */ |
| 268 | #if defined(_WIN32) || defined(__CYGWIN__) |
| @@ -508,19 +509,24 @@ | |
| 508 | ** COMMAND: stash |
| 509 | ** |
| 510 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 511 | ** |
| 512 | ** > fossil stash |
| 513 | ** > fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 514 | ** > fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 515 | ** |
| 516 | ** Save the current changes in the working tree as a new stash. |
| 517 | ** Then revert the changes back to the last check-in. If FILES |
| 518 | ** are listed, then only stash and revert the named files. The |
| 519 | ** "save" verb can be omitted if and only if there are no other |
| 520 | ** arguments. The "snapshot" verb works the same as "save" but |
| 521 | ** omits the revert, keeping the check-out unchanged. |
| 522 | ** |
| 523 | ** > fossil stash list|ls ?-v|--verbose? ?-W|--width NUM? |
| 524 | ** |
| 525 | ** List all changes sets currently stashed. Show information about |
| 526 | ** individual files in each changeset if -v or --verbose is used. |
| 527 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -259,10 +259,11 @@ | |
| 259 | const char *zComment; /* Comment to add to the stash */ |
| 260 | int stashid; /* ID of the new stash */ |
| 261 | int vid; /* Current check-out */ |
| 262 | |
| 263 | zComment = find_option("comment", "m", 1); |
| 264 | (void)fossil_text_editor(); |
| 265 | verify_all_options(); |
| 266 | if( zComment==0 ){ |
| 267 | Blob prompt; /* Prompt for stash comment */ |
| 268 | Blob comment; /* User comment reply */ |
| 269 | #if defined(_WIN32) || defined(__CYGWIN__) |
| @@ -508,19 +509,24 @@ | |
| 509 | ** COMMAND: stash |
| 510 | ** |
| 511 | ** Usage: %fossil stash SUBCOMMAND ARGS... |
| 512 | ** |
| 513 | ** > fossil stash |
| 514 | ** > fossil stash save ?FILES...? |
| 515 | ** > fossil stash snapshot ?FILES...? |
| 516 | ** |
| 517 | ** Save the current changes in the working tree as a new stash. |
| 518 | ** Then revert the changes back to the last check-in. If FILES |
| 519 | ** are listed, then only stash and revert the named files. The |
| 520 | ** "save" verb can be omitted if and only if there are no other |
| 521 | ** arguments. The "snapshot" verb works the same as "save" but |
| 522 | ** omits the revert, keeping the check-out unchanged. |
| 523 | ** |
| 524 | ** Options: |
| 525 | ** --editor NAME Use the NAME editor to enter comment |
| 526 | ** -m|--comment COMMENT Comment text for the new stash |
| 527 | ** |
| 528 | ** |
| 529 | ** > fossil stash list|ls ?-v|--verbose? ?-W|--width NUM? |
| 530 | ** |
| 531 | ** List all changes sets currently stashed. Show information about |
| 532 | ** individual files in each changeset if -v or --verbose is used. |
| 533 |
+1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -47,10 +47,11 @@ | ||
| 47 | 47 | <li> Added the ability to sign check-ins with SSH keys. |
| 48 | 48 | <li> Issue a warning if a user tries to commit on a check-in where the |
| 49 | 49 | branch has been changed. |
| 50 | 50 | <li> The interactive checkin comment prompt shows the formatting rules |
| 51 | 51 | set for that repository. |
| 52 | + <li> Add the "--editor" option. | |
| 52 | 53 | </ol> |
| 53 | 54 | * Deprecate the --comfmtflags and --comment-format global options and |
| 54 | 55 | no longer list them in the built-in help, but keep them working for |
| 55 | 56 | backwards compatibility. |
| 56 | 57 | Alternative TTY comment formatting can still be specified using the |
| 57 | 58 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -47,10 +47,11 @@ | |
| 47 | <li> Added the ability to sign check-ins with SSH keys. |
| 48 | <li> Issue a warning if a user tries to commit on a check-in where the |
| 49 | branch has been changed. |
| 50 | <li> The interactive checkin comment prompt shows the formatting rules |
| 51 | set for that repository. |
| 52 | </ol> |
| 53 | * Deprecate the --comfmtflags and --comment-format global options and |
| 54 | no longer list them in the built-in help, but keep them working for |
| 55 | backwards compatibility. |
| 56 | Alternative TTY comment formatting can still be specified using the |
| 57 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -47,10 +47,11 @@ | |
| 47 | <li> Added the ability to sign check-ins with SSH keys. |
| 48 | <li> Issue a warning if a user tries to commit on a check-in where the |
| 49 | branch has been changed. |
| 50 | <li> The interactive checkin comment prompt shows the formatting rules |
| 51 | set for that repository. |
| 52 | <li> Add the "--editor" option. |
| 53 | </ol> |
| 54 | * Deprecate the --comfmtflags and --comment-format global options and |
| 55 | no longer list them in the built-in help, but keep them working for |
| 56 | backwards compatibility. |
| 57 | Alternative TTY comment formatting can still be specified using the |
| 58 |