Fossil SCM

Fix code stylistic issues with the "stash rm" patch. Also document the new stash verb.

drh 2011-08-24 21:45 UTC stash_rm
Commit d2c4a24275e6aac557208242d229272f4e52ab3d
1 file changed +2 -1
+2 -1
--- src/stash.c
+++ src/stash.c
@@ -345,10 +345,11 @@
345345
** Update to the baseline checkout for STASHID then apply the
346346
** changes of STASHID. Keep STASHID so that it can be reused
347347
** This command is undoable.
348348
**
349349
** fossil stash drop ?STASHID? ?--all?
350
+** fossil stash rm ?STASHID? ?--all?
350351
**
351352
** Forget everything about STASHID. Forget the whole stash if the
352353
** --all flag is used. Individual drops are undoable but --all is not.
353354
**
354355
** fossil stash snapshot ?-m COMMENT? ?FILES...?
@@ -428,11 +429,11 @@
428429
}
429430
}
430431
db_finalize(&q);
431432
if( n==0 ) fossil_print("empty stash\n");
432433
}else
433
- if(( memcmp(zCmd, "drop", nCmd)==0 )||( memcmp(zCmd, "rm", nCmd)==0 )){
434
+ if( memcmp(zCmd, "drop", nCmd)==0 || memcmp(zCmd, "rm", nCmd)==0 ){
434435
int allFlag = find_option("all", 0, 0)!=0;
435436
if( g.argc>4 ) usage("stash apply STASHID");
436437
if( allFlag ){
437438
db_multi_exec("DELETE FROM stash; DELETE FROM stashfile;");
438439
}else{
439440
--- src/stash.c
+++ src/stash.c
@@ -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 )||( 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
--- src/stash.c
+++ src/stash.c
@@ -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

Keyboard Shortcuts

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