Fossil SCM
Enable a “stash make” subcommand as an alias for “stash snapshot”
Commit
4e0274bbc336de42636c34a9a25c11d4f0cdde8f
Parent
ae73c07be0f5300…
1 file changed
+2
-1
+2
-1
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -347,10 +347,11 @@ | ||
| 347 | 347 | ** |
| 348 | 348 | ** Forget everything about STASHID. Forget the whole stash if the |
| 349 | 349 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 350 | 350 | ** |
| 351 | 351 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| 352 | +** fossil stash make ?-m COMMENT? ?FILES...? | |
| 352 | 353 | ** |
| 353 | 354 | ** Save the current changes in the working tress as a new stash |
| 354 | 355 | ** but, unlike "save", do not revert those changes. |
| 355 | 356 | ** |
| 356 | 357 | ** fossil stash diff ?STASHID? |
| @@ -396,11 +397,11 @@ | ||
| 396 | 397 | if( nFile==0 ) return; |
| 397 | 398 | } |
| 398 | 399 | g.argv[1] = "revert"; |
| 399 | 400 | revert_cmd(); |
| 400 | 401 | }else |
| 401 | - if( memcmp(zCmd, "snapshot", nCmd)==0 ){ | |
| 402 | + if( memcmp(zCmd, "snapshot", nCmd)==0 || memcmp(zCmd, "make", nCmd)==0 ){ | |
| 402 | 403 | stash_create(); |
| 403 | 404 | }else |
| 404 | 405 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 405 | 406 | Stmt q; |
| 406 | 407 | int n = 0; |
| 407 | 408 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -347,10 +347,11 @@ | |
| 347 | ** |
| 348 | ** Forget everything about STASHID. Forget the whole stash if the |
| 349 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 350 | ** |
| 351 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| 352 | ** |
| 353 | ** Save the current changes in the working tress as a new stash |
| 354 | ** but, unlike "save", do not revert those changes. |
| 355 | ** |
| 356 | ** fossil stash diff ?STASHID? |
| @@ -396,11 +397,11 @@ | |
| 396 | if( nFile==0 ) return; |
| 397 | } |
| 398 | g.argv[1] = "revert"; |
| 399 | revert_cmd(); |
| 400 | }else |
| 401 | if( memcmp(zCmd, "snapshot", nCmd)==0 ){ |
| 402 | stash_create(); |
| 403 | }else |
| 404 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 405 | Stmt q; |
| 406 | int n = 0; |
| 407 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -347,10 +347,11 @@ | |
| 347 | ** |
| 348 | ** Forget everything about STASHID. Forget the whole stash if the |
| 349 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 350 | ** |
| 351 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| 352 | ** fossil stash make ?-m COMMENT? ?FILES...? |
| 353 | ** |
| 354 | ** Save the current changes in the working tress as a new stash |
| 355 | ** but, unlike "save", do not revert those changes. |
| 356 | ** |
| 357 | ** fossil stash diff ?STASHID? |
| @@ -396,11 +397,11 @@ | |
| 397 | if( nFile==0 ) return; |
| 398 | } |
| 399 | g.argv[1] = "revert"; |
| 400 | revert_cmd(); |
| 401 | }else |
| 402 | if( memcmp(zCmd, "snapshot", nCmd)==0 || memcmp(zCmd, "make", nCmd)==0 ){ |
| 403 | stash_create(); |
| 404 | }else |
| 405 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 406 | Stmt q; |
| 407 | int n = 0; |
| 408 |