From: Eric Sunshine <sunshine@sunshineco.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Yao Zhao <zhaox383@umn.edu>, Git List <git@vger.kernel.org>,
Adam <adam@sigterm.info>, Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH] GSoC Change multiple if-else statements to be table-driven
Date: Mon, 17 Mar 2014 02:29:10 -0400 [thread overview]
Message-ID: <CAPig+cSG0YsdTGWWyxWrg+s235qDe7Xr-jXT2mOkpvA6OaGWyg@mail.gmail.com> (raw)
In-Reply-To: <xmqqiorghgaj.fsf@gitster.dls.corp.google.com>
On Fri, Mar 14, 2014 at 12:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
>> On Thu, Mar 13, 2014 at 4:20 PM, Yao Zhao <zhaox383@umn.edu> wrote:
>>> Subject: [PATCH] GSoC Change multiple if-else statements to be table-driven
>>
>> It's a good idea to let reviewers know that this is attempt 2. Do so
>> by saying [PATCH v2]. Your next one will be [PATCH v3]. The -v option
>> for "git format-email" can help.
>
> Yao, I think Eric meant "git format-patch".
Correct. Sorry for the confusion.
>> An alternate approach might be to use a multi-dimensional array,
>> where the boolean values of rebasing, remote_is_branch, and origin
>> are keys into the array. This would allow you to pick out the
>> correct PRINT_LIST entry directly (no looping), thus eliminating
>> the need for those b_rebasing, b_remote_is_branch, and b_origin
>> members.
>
> Correct.
>
> After seeing so many "table driven" submissions, I however tend to
> agree with your earlier comment on another thread on this same
> micro, where you said an nested if-else cascade that was rewritten
> in a clearer way (sorry, I do not remember whose submission it was
It was Adam NoLastName [1].
[1]: http://thread.gmane.org/gmane.comp.version-control.git/243704
> offhand) may be the best answer to the "Would it make sense to make
> the code table-driven?" question, even though I tentatively queued
> d7ea7894 (install_branch_config(): simplify verbose messages logic,
> 2014-03-13) from Paweł on 'pu'.
Perhaps it is time to mark this microproject as "taken" on the GSoC
page [2], along a fews others for which we have received multiple
submissions.
[2]: https://github.com/git/git.github.io/blob/master/SoC-2014-Microprojects.md
next prev parent reply other threads:[~2014-03-17 6:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 3:47 [PATCH] SoC 2014 MicroProject No.8:change multiple if-else statement to table-driven approach Yao Zhao
2014-03-12 9:21 ` Eric Sunshine
2014-03-13 20:20 ` [PATCH] GSoC Change multiple if-else statements to be table-driven Yao Zhao
2014-03-14 2:16 ` Eric Sunshine
2014-03-14 16:54 ` Junio C Hamano
2014-03-17 6:29 ` Eric Sunshine [this message]
2014-03-17 7:31 ` Junio C Hamano
2014-03-17 14:11 ` Michael Haggerty
2014-03-17 19:12 ` Junio C Hamano
2014-03-17 19:27 ` Eric Sunshine
2014-03-17 20:39 ` Quint Guvernator
2014-03-16 6:08 ` [PATCH/GSoC_v3] branch.c: turn nested if-else logic to table-driven Yao Zhao
2014-03-17 7:54 ` Eric Sunshine
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPig+cSG0YsdTGWWyxWrg+s235qDe7Xr-jXT2mOkpvA6OaGWyg@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=adam@sigterm.info \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
--cc=zhaox383@umn.edu \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).