From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/3] Refactor checkout option handling
Date: Tue, 28 Aug 2012 20:49:05 +0700 [thread overview]
Message-ID: <1346161748-25651-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <7vr4qroel6.fsf@alter.siamese.dyndns.org>
On Tue, Aug 28, 2012 at 10:55 AM, Junio C Hamano <gitster@pobox.com> 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
next prev parent reply other threads:[~2012-08-28 13:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 2:29 [PATCH] checkout: verify new branch name's validity early Nguyễn Thái Ngọc Duy
2012-08-28 3:55 ` Junio C Hamano
2012-08-28 13:49 ` Nguyễn Thái Ngọc Duy [this message]
2012-08-28 13:49 ` [PATCH 1/3] checkout: pass "struct checkout_opts *" as const pointer Nguyễn Thái Ngọc Duy
2012-08-28 13:49 ` [PATCH 2/3] checkout: reorder option handling Nguyễn Thái Ngọc Duy
2012-08-28 20:45 ` Junio C Hamano
2012-08-29 12:16 ` Nguyen Thai Ngoc Duy
2012-08-29 13:55 ` [PATCH v2 1/3] checkout: pass "struct checkout_opts *" as const pointer Nguyễn Thái Ngọc Duy
2012-08-29 13:55 ` [PATCH v2 2/3] checkout: move more parameters to struct checkout_opts Nguyễn Thái Ngọc Duy
2012-08-29 13:55 ` [PATCH v2 3/3] checkout: reorder option handling Nguyễn Thái Ngọc Duy
2012-08-29 18:37 ` Junio C Hamano
2012-08-29 18:55 ` Junio C Hamano
2012-08-30 12:45 ` [PATCH v3 " Nguyễn Thái Ngọc Duy
2012-08-30 16:10 ` Junio C Hamano
2012-09-07 20:19 ` Junio C Hamano
2012-08-28 13:49 ` [PATCH 3/3] checkout: move branch guessing code out as a separate function Nguyễn Thái Ngọc Duy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346161748-25651-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).