Fossil SCM
Merge the "stash rm" command into trunk.
Commit
0b4f83067aba90ec8a3a3340304b51a7cd570fae
Parent
64a2b0d51f6f7ee…
1 file changed
+3
-2
+3
-2
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -275,11 +275,11 @@ | ||
| 275 | 275 | } |
| 276 | 276 | db_finalize(&q); |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | /* |
| 280 | -** Drop the indicates stash | |
| 280 | +** Drop the indicated stash | |
| 281 | 281 | */ |
| 282 | 282 | static void stash_drop(int stashid){ |
| 283 | 283 | db_multi_exec( |
| 284 | 284 | "DELETE FROM stash WHERE stashid=%d;" |
| 285 | 285 | "DELETE FROM stashfile WHERE stashid=%d;", |
| @@ -345,10 +345,11 @@ | ||
| 345 | 345 | ** Update to the baseline checkout for STASHID then apply the |
| 346 | 346 | ** changes of STASHID. Keep STASHID so that it can be reused |
| 347 | 347 | ** This command is undoable. |
| 348 | 348 | ** |
| 349 | 349 | ** fossil stash drop ?STASHID? ?--all? |
| 350 | +** fossil stash rm ?STASHID? ?--all? | |
| 350 | 351 | ** |
| 351 | 352 | ** Forget everything about STASHID. Forget the whole stash if the |
| 352 | 353 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 353 | 354 | ** |
| 354 | 355 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| @@ -428,11 +429,11 @@ | ||
| 428 | 429 | } |
| 429 | 430 | } |
| 430 | 431 | db_finalize(&q); |
| 431 | 432 | if( n==0 ) fossil_print("empty stash\n"); |
| 432 | 433 | }else |
| 433 | - if( memcmp(zCmd, "drop", nCmd)==0 ){ | |
| 434 | + if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ | |
| 434 | 435 | int allFlag = find_option("all", 0, 0)!=0; |
| 435 | 436 | if( g.argc>4 ) usage("stash apply STASHID"); |
| 436 | 437 | if( allFlag ){ |
| 437 | 438 | db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;"); |
| 438 | 439 | }else{ |
| 439 | 440 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -275,11 +275,11 @@ | |
| 275 | } |
| 276 | db_finalize(&q); |
| 277 | } |
| 278 | |
| 279 | /* |
| 280 | ** Drop the indicates stash |
| 281 | */ |
| 282 | static void stash_drop(int stashid){ |
| 283 | db_multi_exec( |
| 284 | "DELETE FROM stash WHERE stashid=%d;" |
| 285 | "DELETE FROM stashfile WHERE stashid=%d;", |
| @@ -345,10 +345,11 @@ | |
| 345 | ** Update to the baseline checkout for STASHID then apply the |
| 346 | ** changes of STASHID. Keep STASHID so that it can be reused |
| 347 | ** This command is undoable. |
| 348 | ** |
| 349 | ** fossil stash drop ?STASHID? ?--all? |
| 350 | ** |
| 351 | ** Forget everything about STASHID. Forget the whole stash if the |
| 352 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 353 | ** |
| 354 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| @@ -428,11 +429,11 @@ | |
| 428 | } |
| 429 | } |
| 430 | db_finalize(&q); |
| 431 | if( n==0 ) fossil_print("empty stash\n"); |
| 432 | }else |
| 433 | if( memcmp(zCmd, "drop", nCmd)==0 ){ |
| 434 | int allFlag = find_option("all", 0, 0)!=0; |
| 435 | if( g.argc>4 ) usage("stash apply STASHID"); |
| 436 | if( allFlag ){ |
| 437 | db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;"); |
| 438 | }else{ |
| 439 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -275,11 +275,11 @@ | |
| 275 | } |
| 276 | db_finalize(&q); |
| 277 | } |
| 278 | |
| 279 | /* |
| 280 | ** Drop the indicated stash |
| 281 | */ |
| 282 | static void stash_drop(int stashid){ |
| 283 | db_multi_exec( |
| 284 | "DELETE FROM stash WHERE stashid=%d;" |
| 285 | "DELETE FROM stashfile WHERE stashid=%d;", |
| @@ -345,10 +345,11 @@ | |
| 345 | ** Update to the baseline checkout for STASHID then apply the |
| 346 | ** changes of STASHID. Keep STASHID so that it can be reused |
| 347 | ** This command is undoable. |
| 348 | ** |
| 349 | ** fossil stash drop ?STASHID? ?--all? |
| 350 | ** fossil stash rm ?STASHID? ?--all? |
| 351 | ** |
| 352 | ** Forget everything about STASHID. Forget the whole stash if the |
| 353 | ** --all flag is used. Individual drops are undoable but --all is not. |
| 354 | ** |
| 355 | ** fossil stash snapshot ?-m COMMENT? ?FILES...? |
| @@ -428,11 +429,11 @@ | |
| 429 | } |
| 430 | } |
| 431 | db_finalize(&q); |
| 432 | if( n==0 ) fossil_print("empty stash\n"); |
| 433 | }else |
| 434 | if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){ |
| 435 | int allFlag = find_option("all", 0, 0)!=0; |
| 436 | if( g.argc>4 ) usage("stash apply STASHID"); |
| 437 | if( allFlag ){ |
| 438 | db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;"); |
| 439 | }else{ |
| 440 |