Subject: [PATCH 0/3] Refactor checkout option handling

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Tue, 28 Aug 2012 20:49:05 +0700

On Tue, Aug 28, 2012 at 10:55 AM, Junio C Hamano <[email-masked]> wrote:
> The surrounding code is somewhat tricky and the code structure is
> brittle; there are places that update the opts.new_branch so the new
> location of this check has to be after them, and there is one
> codepath that having a bad value in it does not matter.
>
> I had to check the code outside the context of this patch a few
> times to convince myself that this patch does not break them.  I'll
> queue the patch as-is for now, but we probably would want to see how
> we can structure it to be less brittle.

I'll give it a shot. On top of master, not the "checkout -b -t" patch.
The test suite passes, but we'll need more eyeballs for code moves
like this.

Nguyễn Thái Ngọc Duy (3):
  checkout: pass "struct checkout_opts *" as const pointer
  checkout: reorder option handling
  checkout: move branch guessing code out as a separate function

 builtin/checkout.c | 290 ++++++++++++++++++++++++++++++-----------------------
 1 file changed, 164 insertions(+), 126 deletions(-)

-- 
1.7.12.rc2.18.g61b472e