Fossil SCM
"rm" subcmd to stash, "drop"-alike functionality
Commit
1f4e6cf1ae1ab742172d9981a8e8579e5711377a
Parent
a87717ad86e83ff…
1 file changed
+2
-2
+2
-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;", |
| @@ -428,11 +428,11 @@ | ||
| 428 | 428 | } |
| 429 | 429 | } |
| 430 | 430 | db_finalize(&q); |
| 431 | 431 | if( n==0 ) fossil_print("empty stash\n"); |
| 432 | 432 | }else |
| 433 | - if( memcmp(zCmd, "drop", nCmd)==0 ){ | |
| 433 | + if(( memcmp(zCmd, "drop", nCmd)==0 )||( memcmp(zCmd, "rm", nCmd)==0 )){ | |
| 434 | 434 | int allFlag = find_option("all", 0, 0)!=0; |
| 435 | 435 | if( g.argc>4 ) usage("stash apply STASHID"); |
| 436 | 436 | if( allFlag ){ |
| 437 | 437 | db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;"); |
| 438 | 438 | }else{ |
| 439 | 439 |
| --- 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;", |
| @@ -428,11 +428,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;", |
| @@ -428,11 +428,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 )||( memcmp(zCmd, "rm", 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 |