Fossil SCM

"cat" synonym for "stash show"

bch 2015-09-15 19:11 trunk
Commit 533f8b6aeacb554fe469fec783e5ef841a6e4012
1 file changed +12 -3
+12 -3
--- src/stash.c
+++ src/stash.c
@@ -428,11 +428,11 @@
428428
** fossil stash ls ?-v|--verbose?
429429
**
430430
** List all changes sets currently stashed. Show information about
431431
** individual files in each changeset if -v or --verbose is used.
432432
**
433
-** fossil stash show ?STASHID? ?DIFF-FLAGS?
433
+** fossil stash show|cat ?STASHID? ?DIFF-FLAGS?
434434
**
435435
** Show the content of a stash
436436
**
437437
** fossil stash pop
438438
** fossil stash apply ?STASHID?
@@ -464,11 +464,11 @@
464464
** SUMMARY:
465465
** fossil stash
466466
** fossil stash save ?-m|--comment COMMENT? ?FILES...?
467467
** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
468468
** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>?
469
-** fossil stash show ?STASHID? ?DIFF-OPTIONS?
469
+** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS?
470470
** fossil stash pop
471471
** fossil stash apply ?STASHID?
472472
** fossil stash goto ?STASHID?
473473
** fossil stash rm|drop ?STASHID? ?-a|--all?
474474
** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS?
@@ -638,19 +638,28 @@
638638
undo_finish();
639639
}else
640640
if( memcmp(zCmd, "diff", nCmd)==0
641641
|| memcmp(zCmd, "gdiff", nCmd)==0
642642
|| memcmp(zCmd, "show", nCmd)==0
643
+ || memcmp(zCmd, "cat", nCmd)==0
643644
){
644645
const char *zDiffCmd = 0;
645646
const char *zBinGlob = 0;
646647
int fIncludeBinary = 0;
647648
u64 diffFlags;
648649
649650
if( find_option("tk",0,0)!=0 ){
650651
db_close(0);
651
- diff_tk((zCmd[0]=='s' ? "stash show" : "stash diff"), 3);
652
+ switch (zCmd[0]) {
653
+ case 's':
654
+ case 'c':
655
+ diff_tk("stash show", 3);
656
+ break;
657
+
658
+ default:
659
+ diff_tk("stash diff", 3);
660
+ }
652661
return;
653662
}
654663
if( find_option("internal","i",0)==0 ){
655664
zDiffCmd = diff_command_external(memcmp(zCmd, "gdiff", nCmd)==0);
656665
}
657666
--- src/stash.c
+++ src/stash.c
@@ -428,11 +428,11 @@
428 ** fossil stash ls ?-v|--verbose?
429 **
430 ** List all changes sets currently stashed. Show information about
431 ** individual files in each changeset if -v or --verbose is used.
432 **
433 ** fossil stash show ?STASHID? ?DIFF-FLAGS?
434 **
435 ** Show the content of a stash
436 **
437 ** fossil stash pop
438 ** fossil stash apply ?STASHID?
@@ -464,11 +464,11 @@
464 ** SUMMARY:
465 ** fossil stash
466 ** fossil stash save ?-m|--comment COMMENT? ?FILES...?
467 ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
468 ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>?
469 ** fossil stash show ?STASHID? ?DIFF-OPTIONS?
470 ** fossil stash pop
471 ** fossil stash apply ?STASHID?
472 ** fossil stash goto ?STASHID?
473 ** fossil stash rm|drop ?STASHID? ?-a|--all?
474 ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS?
@@ -638,19 +638,28 @@
638 undo_finish();
639 }else
640 if( memcmp(zCmd, "diff", nCmd)==0
641 || memcmp(zCmd, "gdiff", nCmd)==0
642 || memcmp(zCmd, "show", nCmd)==0
 
643 ){
644 const char *zDiffCmd = 0;
645 const char *zBinGlob = 0;
646 int fIncludeBinary = 0;
647 u64 diffFlags;
648
649 if( find_option("tk",0,0)!=0 ){
650 db_close(0);
651 diff_tk((zCmd[0]=='s' ? "stash show" : "stash diff"), 3);
 
 
 
 
 
 
 
 
652 return;
653 }
654 if( find_option("internal","i",0)==0 ){
655 zDiffCmd = diff_command_external(memcmp(zCmd, "gdiff", nCmd)==0);
656 }
657
--- src/stash.c
+++ src/stash.c
@@ -428,11 +428,11 @@
428 ** fossil stash ls ?-v|--verbose?
429 **
430 ** List all changes sets currently stashed. Show information about
431 ** individual files in each changeset if -v or --verbose is used.
432 **
433 ** fossil stash show|cat ?STASHID? ?DIFF-FLAGS?
434 **
435 ** Show the content of a stash
436 **
437 ** fossil stash pop
438 ** fossil stash apply ?STASHID?
@@ -464,11 +464,11 @@
464 ** SUMMARY:
465 ** fossil stash
466 ** fossil stash save ?-m|--comment COMMENT? ?FILES...?
467 ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...?
468 ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>?
469 ** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS?
470 ** fossil stash pop
471 ** fossil stash apply ?STASHID?
472 ** fossil stash goto ?STASHID?
473 ** fossil stash rm|drop ?STASHID? ?-a|--all?
474 ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS?
@@ -638,19 +638,28 @@
638 undo_finish();
639 }else
640 if( memcmp(zCmd, "diff", nCmd)==0
641 || memcmp(zCmd, "gdiff", nCmd)==0
642 || memcmp(zCmd, "show", nCmd)==0
643 || memcmp(zCmd, "cat", nCmd)==0
644 ){
645 const char *zDiffCmd = 0;
646 const char *zBinGlob = 0;
647 int fIncludeBinary = 0;
648 u64 diffFlags;
649
650 if( find_option("tk",0,0)!=0 ){
651 db_close(0);
652 switch (zCmd[0]) {
653 case 's':
654 case 'c':
655 diff_tk("stash show", 3);
656 break;
657
658 default:
659 diff_tk("stash diff", 3);
660 }
661 return;
662 }
663 if( find_option("internal","i",0)==0 ){
664 zDiffCmd = diff_command_external(memcmp(zCmd, "gdiff", nCmd)==0);
665 }
666

Keyboard Shortcuts

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