Fossil SCM
Avoid warning about extra call to db_end_transaction() by returning at the end of a complete block.
Commit
7b2350a86b96f2b5839a6480ca0bee17eeab0014a931689a4640387b18ab9540
Parent
d959c48ac6c3405…
1 file changed
+1
+1
| --- src/stash.c | ||
| +++ src/stash.c | ||
| @@ -616,10 +616,11 @@ | ||
| 616 | 616 | /* Make sure the stash has committed before running the revert, so that |
| 617 | 617 | ** we have a copy of the changes before deleting them. */ |
| 618 | 618 | db_commit_transaction(); |
| 619 | 619 | g.argv[1] = "revert"; |
| 620 | 620 | revert_cmd(); |
| 621 | + return; | |
| 621 | 622 | }else |
| 622 | 623 | if( memcmp(zCmd, "snapshot", nCmd)==0 ){ |
| 623 | 624 | stash_create(); |
| 624 | 625 | }else |
| 625 | 626 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 626 | 627 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -616,10 +616,11 @@ | |
| 616 | /* Make sure the stash has committed before running the revert, so that |
| 617 | ** we have a copy of the changes before deleting them. */ |
| 618 | db_commit_transaction(); |
| 619 | g.argv[1] = "revert"; |
| 620 | revert_cmd(); |
| 621 | }else |
| 622 | if( memcmp(zCmd, "snapshot", nCmd)==0 ){ |
| 623 | stash_create(); |
| 624 | }else |
| 625 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 626 |
| --- src/stash.c | |
| +++ src/stash.c | |
| @@ -616,10 +616,11 @@ | |
| 616 | /* Make sure the stash has committed before running the revert, so that |
| 617 | ** we have a copy of the changes before deleting them. */ |
| 618 | db_commit_transaction(); |
| 619 | g.argv[1] = "revert"; |
| 620 | revert_cmd(); |
| 621 | return; |
| 622 | }else |
| 623 | if( memcmp(zCmd, "snapshot", nCmd)==0 ){ |
| 624 | stash_create(); |
| 625 | }else |
| 626 | if( memcmp(zCmd, "list", nCmd)==0 || memcmp(zCmd, "ls", nCmd)==0 ){ |
| 627 |