@@ -720,17 +720,19 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
720
720
OPT_STRING ('u' , "set-upstream-to" , & new_upstream , N_ ("upstream" ), N_ ("change the upstream info" )),
721
721
OPT_BOOL (0 , "unset-upstream" , & unset_upstream , N_ ("unset the upstream info" )),
722
722
OPT__COLOR (& branch_use_color , N_ ("use colored output" )),
723
- OPT_SET_INT ('r' , "remotes" , & filter .kind , N_ ("act on remote-tracking branches" ),
724
- FILTER_REFS_REMOTES ),
723
+ OPT_SET_INT_F ('r' , "remotes" , & filter .kind , N_ ("act on remote-tracking branches" ),
724
+ FILTER_REFS_REMOTES ,
725
+ PARSE_OPT_NONEG ),
725
726
OPT_CONTAINS (& filter .with_commit , N_ ("print only branches that contain the commit" )),
726
727
OPT_NO_CONTAINS (& filter .no_commit , N_ ("print only branches that don't contain the commit" )),
727
728
OPT_WITH (& filter .with_commit , N_ ("print only branches that contain the commit" )),
728
729
OPT_WITHOUT (& filter .no_commit , N_ ("print only branches that don't contain the commit" )),
729
730
OPT__ABBREV (& filter .abbrev ),
730
731
731
732
OPT_GROUP (N_ ("Specific git-branch actions:" )),
732
- OPT_SET_INT ('a' , "all" , & filter .kind , N_ ("list both remote-tracking and local branches" ),
733
- FILTER_REFS_REMOTES | FILTER_REFS_BRANCHES ),
733
+ OPT_SET_INT_F ('a' , "all" , & filter .kind , N_ ("list both remote-tracking and local branches" ),
734
+ FILTER_REFS_REMOTES | FILTER_REFS_BRANCHES ,
735
+ PARSE_OPT_NONEG ),
734
736
OPT_BIT ('d' , "delete" , & delete , N_ ("delete fully merged branch" ), 1 ),
735
737
OPT_BIT ('D' , NULL , & delete , N_ ("delete branch (even if not merged)" ), 2 ),
736
738
OPT_BIT ('m' , "move" , & rename , N_ ("move/rename a branch and its reflog" ), 1 ),
0 commit comments