Fossil SCM

Extend support for the --editor option to "fossil stash save" and "fossil stash snapshot".

drh 2025-04-17 13:43 trunk
Commit b9f569b2c906ce2899fe27a506f404503e42487a80c9edbfae6479236b0eb9ca
2 files changed +8 -2 +1
+8 -2
--- src/stash.c
+++ src/stash.c
@@ -259,10 +259,11 @@
259259
const char *zComment; /* Comment to add to the stash */
260260
int stashid; /* ID of the new stash */
261261
int vid; /* Current check-out */
262262
263263
zComment = find_option("comment", "m", 1);
264
+ (void)fossil_text_editor();
264265
verify_all_options();
265266
if( zComment==0 ){
266267
Blob prompt; /* Prompt for stash comment */
267268
Blob comment; /* User comment reply */
268269
#if defined(_WIN32) || defined(__CYGWIN__)
@@ -508,19 +509,24 @@
508509
** COMMAND: stash
509510
**
510511
** Usage: %fossil stash SUBCOMMAND ARGS...
511512
**
512513
** > 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...?
515516
**
516517
** Save the current changes in the working tree as a new stash.
517518
** Then revert the changes back to the last check-in. If FILES
518519
** are listed, then only stash and revert the named files. The
519520
** "save" verb can be omitted if and only if there are no other
520521
** arguments. The "snapshot" verb works the same as "save" but
521522
** 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
+**
522528
**
523529
** > fossil stash list|ls ?-v|--verbose? ?-W|--width NUM?
524530
**
525531
** List all changes sets currently stashed. Show information about
526532
** individual files in each changeset if -v or --verbose is used.
527533
--- 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
--- www/changes.wiki
+++ www/changes.wiki
@@ -47,10 +47,11 @@
4747
<li> Added the ability to sign check-ins with SSH keys.
4848
<li> Issue a warning if a user tries to commit on a check-in where the
4949
branch has been changed.
5050
<li> The interactive checkin comment prompt shows the formatting rules
5151
set for that repository.
52
+ <li> Add the "--editor" option.
5253
</ol>
5354
* Deprecate the --comfmtflags and --comment-format global options and
5455
no longer list them in the built-in help, but keep them working for
5556
backwards compatibility.
5657
Alternative TTY comment formatting can still be specified using the
5758
--- 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

Keyboard Shortcuts

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