@@ -649,7 +649,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
649
649
int with_current_branch = 0 ;
650
650
int head_at = -1 ;
651
651
int topics = 0 ;
652
- int dense = 1 ;
652
+ int sparse = 0 ;
653
653
const char * reflog_base = NULL ;
654
654
struct option builtin_show_branch_options [] = {
655
655
OPT_BOOL ('a' , "all" , & all_heads ,
@@ -671,17 +671,17 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
671
671
N_ ("show possible merge bases" )),
672
672
OPT_BOOL (0 , "independent" , & independent ,
673
673
N_ ("show refs unreachable from any other ref" )),
674
- OPT_SET_INT (0 , "topo-order" , & sort_order ,
675
- N_ ("show commits in topological order" ),
676
- REV_SORT_IN_GRAPH_ORDER ),
674
+ OPT_SET_INT_F (0 , "topo-order" , & sort_order ,
675
+ N_ ("show commits in topological order" ),
676
+ REV_SORT_IN_GRAPH_ORDER , PARSE_OPT_NONEG ),
677
677
OPT_BOOL (0 , "topics" , & topics ,
678
678
N_ ("show only commits not on the first branch" )),
679
- OPT_SET_INT (0 , "sparse" , & dense ,
680
- N_ ("show merges reachable from only one tip" ), 0 ),
681
- OPT_SET_INT (0 , "date-order" , & sort_order ,
682
- N_ ("topologically sort, maintaining date order "
683
- "where possible" ),
684
- REV_SORT_BY_COMMIT_DATE ),
679
+ OPT_SET_INT (0 , "sparse" , & sparse ,
680
+ N_ ("show merges reachable from only one tip" ), 1 ),
681
+ OPT_SET_INT_F (0 , "date-order" , & sort_order ,
682
+ N_ ("topologically sort, maintaining date order "
683
+ "where possible" ),
684
+ REV_SORT_BY_COMMIT_DATE , PARSE_OPT_NONEG ),
685
685
OPT_CALLBACK_F ('g' , "reflog" , & reflog_base , N_ ("<n>[,<base>]" ),
686
686
N_ ("show <n> most recent ref-log entries starting at "
687
687
"base" ),
@@ -940,7 +940,7 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
940
940
!is_merge_point &&
941
941
(this_flag & (1u << REV_SHIFT )))
942
942
continue ;
943
- if (dense && is_merge &&
943
+ if (! sparse && is_merge &&
944
944
omit_in_dense (commit , rev , num_rev ))
945
945
continue ;
946
946
for (i = 0 ; i < num_rev ; i ++ ) {
0 commit comments