author | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Oct 2009 21:48:44 +0000 (14:48 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 4 Oct 2009 21:48:44 +0000 (14:48 -0700) |
* jc/maint-1.6.4-show-branch-default:
show-branch: fix segfault when showbranch.default exists
show-branch: fix segfault when showbranch.default exists
1 | 2 | |||
---|---|---|---|---|
builtin-show-branch.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-show-branch.c
index 01bea3b583b53f4930a1ab17d64b1b714f58099c,5d85ab0cae9029f9324fca9a9923e8b61b751607..baec9ed56f4098183445b85cdd1b2789d487d6fe
+++ b/builtin-show-branch.c
/* 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;