branch -m: handle no arg properly
authorTay Ray Chuan <redacted>
Wed, 2 Nov 2011 16:17:12 +0000 (00:17 +0800)
committerJunio C Hamano <redacted>
Wed, 2 Nov 2011 19:35:37 +0000 (12:35 -0700)
commit3706ed298cbb5d4052ca0793ca36d9f28b4885bc
treeac8c721ab252d7516330c354d54eb505dd6e76bc
parent87bf9a7048c623b3567f612ca3e67a0d412fc83d
branch -m: handle no arg properly

Modify the option parsing heuristic to handle all -m (rename) cases,
including the no-arg case.

Previously, this "fell through" to the (argc <= 2) case and caused
segfault.

Reported-by: Stefan Näwe <redacted>
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/branch.c
git clone https://git.99rst.org/PROJECT