Fossil SCM

Fix find_option() error and badly type --users in argument test.

preben 2023-09-28 17:58 filter-branch-ls-by-user
Commit 119cc37ac5db72b222654a5c6fb634f2f2064fd79ac748a5ac79ac541b1668da
1 file changed +3 -3
+3 -3
--- src/branch.c
+++ src/branch.c
@@ -731,11 +731,11 @@
731731
if( find_option("t",0,0)!=0 ) brFlags |= BRL_ORDERBY_MTIME;
732732
if( find_option("r",0,0)!=0 ) brFlags |= BRL_REVERSE;
733733
if( find_option("p",0,0)!=0 ) brFlags |= BRL_PRIVATE;
734734
if( find_option("merged","m",0)!=0 ) brFlags |= BRL_MERGED;
735735
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 ){
737737
if( zUser ){
738738
fossil_fatal("flags --username and --self are mutually exclusive");
739739
}
740740
user_select();
741741
zUser = login_name();
@@ -754,12 +754,12 @@
754754
fossil_fatal("the lsh subcommand allows one optional numeric argument");
755755
}
756756
brFlags |= BRL_ORDERBY_MTIME;
757757
}else{
758758
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");
761761
}
762762
if( g.argc >= 4 ) zBrNameGlob = g.argv[3];
763763
}
764764
765765
if( g.localOpen ){
766766
--- 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

Keyboard Shortcuts

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