Fossil SCM
"cat" synonym for "stash show"
Commit
533f8b6aeacb554fe469fec783e5ef841a6e4012
Parent
f6c13632bb9632f…
1 file changed
+12
-3
+12
-3
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -428,11 +428,11 @@ | ||
| 428 | 428 | ** fossil stash ls ?-v|--verbose? |
| 429 | 429 | ** |
| 430 | 430 | ** List all changes sets currently stashed. Show information about |
| 431 | 431 | ** individual files in each changeset if -v or --verbose is used. |
| 432 | 432 | ** |
| 433 | -** fossil stash show ?STASHID? ?DIFF-FLAGS? | |
| 433 | +** fossil stash show|cat ?STASHID? ?DIFF-FLAGS? | |
| 434 | 434 | ** |
| 435 | 435 | ** Show the content of a stash |
| 436 | 436 | ** |
| 437 | 437 | ** fossil stash pop |
| 438 | 438 | ** fossil stash apply ?STASHID? |
| @@ -464,11 +464,11 @@ | ||
| 464 | 464 | ** SUMMARY: |
| 465 | 465 | ** fossil stash |
| 466 | 466 | ** fossil stash save ?-m|--comment COMMENT? ?FILES...? |
| 467 | 467 | ** fossil stash snapshot ?-m|--comment COMMENT? ?FILES...? |
| 468 | 468 | ** fossil stash list|ls ?-v|--verbose? ?-W|--width <num>? |
| 469 | -** fossil stash show ?STASHID? ?DIFF-OPTIONS? | |
| 469 | +** fossil stash show|cat ?STASHID? ?DIFF-OPTIONS? | |
| 470 | 470 | ** fossil stash pop |
| 471 | 471 | ** fossil stash apply ?STASHID? |
| 472 | 472 | ** fossil stash goto ?STASHID? |
| 473 | 473 | ** fossil stash rm|drop ?STASHID? ?-a|--all? |
| 474 | 474 | ** fossil stash [g]diff ?STASHID? ?DIFF-OPTIONS? |
| @@ -638,19 +638,28 @@ | ||
| 638 | 638 | undo_finish(); |
| 639 | 639 | }else |
| 640 | 640 | if( memcmp(zCmd, "diff", nCmd)==0 |
| 641 | 641 | || memcmp(zCmd, "gdiff", nCmd)==0 |
| 642 | 642 | || memcmp(zCmd, "show", nCmd)==0 |
| 643 | + || memcmp(zCmd, "cat", nCmd)==0 | |
| 643 | 644 | ){ |
| 644 | 645 | const char *zDiffCmd = 0; |
| 645 | 646 | const char *zBinGlob = 0; |
| 646 | 647 | int fIncludeBinary = 0; |
| 647 | 648 | u64 diffFlags; |
| 648 | 649 | |
| 649 | 650 | if( find_option("tk",0,0)!=0 ){ |
| 650 | 651 | 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 | + } | |
| 652 | 661 | return; |
| 653 | 662 | } |
| 654 | 663 | if( find_option("internal","i",0)==0 ){ |
| 655 | 664 | zDiffCmd = diff_command_external(memcmp(zCmd, "gdiff", nCmd)==0); |
| 656 | 665 | } |
| 657 | 666 |
| --- 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 |