Re: [PATCH v2] branch: segfault fixes and validation

2013-02-22 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > branch_get() can return NULL (so far on detached HEAD only) but some > code paths in builtin/branch.c cannot deal with that and cause > segfaults. While at there, make sure we bail out when the user gives 2 > or more arguments, but we only process the first one and

[PATCH v2] branch: segfault fixes and validation

2013-02-22 Thread Nguyễn Thái Ngọc Duy
branch_get() can return NULL (so far on detached HEAD only) but some code paths in builtin/branch.c cannot deal with that and cause segfaults. While at there, make sure we bail out when the user gives 2 or more arguments, but we only process the first one and silently ignore the rest. Signed-off-b