Fossil SCM
Fix find_option() error and badly type --users in argument test.
Commit
119cc37ac5db72b222654a5c6fb634f2f2064fd79ac748a5ac79ac541b1668da
Parent
4615e2072af5381…
1 file changed
+3
-3
+3
-3
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -731,11 +731,11 @@ | ||
| 731 | 731 | if( find_option("t",0,0)!=0 ) brFlags |= BRL_ORDERBY_MTIME; |
| 732 | 732 | if( find_option("r",0,0)!=0 ) brFlags |= BRL_REVERSE; |
| 733 | 733 | if( find_option("p",0,0)!=0 ) brFlags |= BRL_PRIVATE; |
| 734 | 734 | if( find_option("merged","m",0)!=0 ) brFlags |= BRL_MERGED; |
| 735 | 735 | if( find_option("unmerged","M",0)!=0 ) brFlags |= BRL_UNMERGED; |
| 736 | - if( find_option("self","0",0)!=0 ){ | |
| 736 | + if( find_option("self",0,0)!=0 ){ | |
| 737 | 737 | if( zUser ){ |
| 738 | 738 | fossil_fatal("flags --username and --self are mutually exclusive"); |
| 739 | 739 | } |
| 740 | 740 | user_select(); |
| 741 | 741 | zUser = login_name(); |
| @@ -754,12 +754,12 @@ | ||
| 754 | 754 | fossil_fatal("the lsh subcommand allows one optional numeric argument"); |
| 755 | 755 | } |
| 756 | 756 | brFlags |= BRL_ORDERBY_MTIME; |
| 757 | 757 | }else{ |
| 758 | 758 | if( (g.argc == 4 || g.argc == 5) |
| 759 | - && fossil_strcmp(g.argv[g.argc-1], "--user") == 0 ){ | |
| 760 | - fossil_fatal("Missing argument for --user"); | |
| 759 | + && fossil_strcmp(g.argv[g.argc-1], "--users") == 0 ){ | |
| 760 | + fossil_fatal("Missing argument for --users"); | |
| 761 | 761 | } |
| 762 | 762 | if( g.argc >= 4 ) zBrNameGlob = g.argv[3]; |
| 763 | 763 | } |
| 764 | 764 | |
| 765 | 765 | if( g.localOpen ){ |
| 766 | 766 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -731,11 +731,11 @@ | |
| 731 | if( find_option("t",0,0)!=0 ) brFlags |= BRL_ORDERBY_MTIME; |
| 732 | if( find_option("r",0,0)!=0 ) brFlags |= BRL_REVERSE; |
| 733 | if( find_option("p",0,0)!=0 ) brFlags |= BRL_PRIVATE; |
| 734 | if( find_option("merged","m",0)!=0 ) brFlags |= BRL_MERGED; |
| 735 | if( find_option("unmerged","M",0)!=0 ) brFlags |= BRL_UNMERGED; |
| 736 | if( find_option("self","0",0)!=0 ){ |
| 737 | if( zUser ){ |
| 738 | fossil_fatal("flags --username and --self are mutually exclusive"); |
| 739 | } |
| 740 | user_select(); |
| 741 | zUser = login_name(); |
| @@ -754,12 +754,12 @@ | |
| 754 | fossil_fatal("the lsh subcommand allows one optional numeric argument"); |
| 755 | } |
| 756 | brFlags |= BRL_ORDERBY_MTIME; |
| 757 | }else{ |
| 758 | if( (g.argc == 4 || g.argc == 5) |
| 759 | && fossil_strcmp(g.argv[g.argc-1], "--user") == 0 ){ |
| 760 | fossil_fatal("Missing argument for --user"); |
| 761 | } |
| 762 | if( g.argc >= 4 ) zBrNameGlob = g.argv[3]; |
| 763 | } |
| 764 | |
| 765 | if( g.localOpen ){ |
| 766 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -731,11 +731,11 @@ | |
| 731 | if( find_option("t",0,0)!=0 ) brFlags |= BRL_ORDERBY_MTIME; |
| 732 | if( find_option("r",0,0)!=0 ) brFlags |= BRL_REVERSE; |
| 733 | if( find_option("p",0,0)!=0 ) brFlags |= BRL_PRIVATE; |
| 734 | if( find_option("merged","m",0)!=0 ) brFlags |= BRL_MERGED; |
| 735 | if( find_option("unmerged","M",0)!=0 ) brFlags |= BRL_UNMERGED; |
| 736 | if( find_option("self",0,0)!=0 ){ |
| 737 | if( zUser ){ |
| 738 | fossil_fatal("flags --username and --self are mutually exclusive"); |
| 739 | } |
| 740 | user_select(); |
| 741 | zUser = login_name(); |
| @@ -754,12 +754,12 @@ | |
| 754 | fossil_fatal("the lsh subcommand allows one optional numeric argument"); |
| 755 | } |
| 756 | brFlags |= BRL_ORDERBY_MTIME; |
| 757 | }else{ |
| 758 | if( (g.argc == 4 || g.argc == 5) |
| 759 | && fossil_strcmp(g.argv[g.argc-1], "--users") == 0 ){ |
| 760 | fossil_fatal("Missing argument for --users"); |
| 761 | } |
| 762 | if( g.argc >= 4 ) zBrNameGlob = g.argv[3]; |
| 763 | } |
| 764 | |
| 765 | if( g.localOpen ){ |
| 766 |