From: Junio C Hamano Date: Sun, 4 Oct 2009 21:48:44 +0000 (-0700) Subject: Merge branch 'jc/maint-1.6.4-show-branch-default' into maint X-Git-Tag: v1.6.5-rc3~3^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=04ce83e2b9a1f1512d3d0c873e8f13d06761620c;p=git.git Merge branch 'jc/maint-1.6.4-show-branch-default' into maint * jc/maint-1.6.4-show-branch-default: show-branch: fix segfault when showbranch.default exists --- 04ce83e2b9a1f1512d3d0c873e8f13d06761620c diff --cc builtin-show-branch.c index 01bea3b58,5d85ab0ca..baec9ed56 --- a/builtin-show-branch.c +++ b/builtin-show-branch.c @@@ -692,11 -701,11 +700,11 @@@ int cmd_show_branch(int ac, const char /* If nothing is specified, try the default first */ if (ac == 1 && default_num) { - ac = default_num + 1; - av = default_arg - 1; /* ick; we would not address av[0] */ + ac = default_num; + av = default_arg; } - ac = parse_options(ac, av, builtin_show_branch_options, + ac = parse_options(ac, av, prefix, builtin_show_branch_options, show_branch_usage, PARSE_OPT_STOP_AT_NON_OPTION); if (all_heads) all_remotes = 1;