Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-24 Thread Aleksey Mokhovikov
On 03/22/2014 04:13 AM, Michael Haggerty wrote: My expectation when I invented that microproject was that converting the code to be table-driven would be judged *not* to be an improvement. I was hoping that a student would say the 'if' statement is OK, but let's delete this ridiculous

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-24 Thread Michael Haggerty
On 03/24/2014 08:28 AM, Aleksey Mokhovikov wrote: On 03/22/2014 04:13 AM, Michael Haggerty wrote: My expectation when I invented that microproject was that converting the code to be table-driven would be judged *not* to be an improvement. I was hoping that a student would say the 'if'

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-21 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Sorry, you're right about message[0] case not being a crasher (though the assert() still seems overkill). Assert() often becomes no-op in production build. I think this may be an indication that table-driven may not be as good an approach as many

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-21 Thread Michael Haggerty
On 03/21/2014 06:09 PM, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: Sorry, you're right about message[0] case not being a crasher (though the assert() still seems overkill). Assert() often becomes no-op in production build. I think this may be an indication that

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-21 Thread Eric Sunshine
On Fri, Mar 21, 2014 at 5:13 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/21/2014 06:09 PM, Junio C Hamano wrote: Eric Sunshine sunsh...@sunshineco.com writes: Sorry, you're right about message[0] case not being a crasher (though the assert() still seems overkill). Assert() often

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-21 Thread Michael Haggerty
On 03/21/2014 10:33 PM, Eric Sunshine wrote: On Fri, Mar 21, 2014 at 5:13 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 03/21/2014 06:09 PM, Junio C Hamano wrote: Assert() often becomes no-op in production build. I think this may be an indication that table-driven may not be as good

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-20 Thread Aleksey Mokhovikov
On 03/19/2014 04:21 PM, Eric Sunshine wrote: Thanks for the resubmission. Comments below... On Tue, Mar 18, 2014 at 10:33 AM, Aleksey Mokhovikov moxobu...@gmail.com wrote: Subject: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-20 Thread Eric Sunshine
On Thu, Mar 20, 2014 at 7:56 AM, Aleksey Mokhovikov moxobu...@gmail.com wrote: On 03/19/2014 04:21 PM, Eric Sunshine wrote: Thanks for the resubmission. Comments below... On Tue, Mar 18, 2014 at 10:33 AM, Aleksey Mokhovikov moxobu...@gmail.com wrote: Subject: [PATCH][GSOC] Selection of the

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-19 Thread Eric Sunshine
Thanks for the resubmission. Comments below... On Tue, Mar 18, 2014 at 10:33 AM, Aleksey Mokhovikov moxobu...@gmail.com wrote: Subject: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config() Say [PATCH v2] to indicate your second attempt.

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-18 Thread Aleksey Mokhovikov
This patch replaces if chain that selects the message with 2 dimensional array of format strings and arguments. Signed-off-by: Aleksey Mokhovikov moxobu...@gmail.com --- This patch is unrelated with previous one, but related to GSoC. So I don't know if I should create new thread for this patch.

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-18 Thread Aleksey Mokhovikov
Eric Sunshine sunshine at sunshineco.com writes: The subject should be concise. Try to keep it at 65-70 characters or less. More detailed information can be written following the subject (separated from the subject by a blank line). Write in imperative tone: say replace X with Y rather than

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-18 Thread Aleksey Mokhovikov
This patch replaces if chain with 2 dimensional array of format strings and arguments. Signed-off-by: Aleksey Mokhovikov moxobu...@gmail.com --- This patch is unrelated with previous one, but related to GSoC. So I don't know if I should create new thread for this patch. Compare with original

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-18 Thread Aleksey Mokhovikov
Matthieu Moy Matthieu.Moy at grenoble-inp.fr writes: Hi, Aleksey Mokhovikov moxobukob at gmail.com writes: Please, read the threads for other submissions for this microproject. Most remarks done there also apply for your case. See for example:

[PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-17 Thread Aleksey Mokhovikov
This is a milliproject from git google summer of code page. The current code that selects the output message is quite easy to understand. So I tried to improve it by removing nested conditions and code duplication. The output string is generated by selecting the proper parts of the message and

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-17 Thread Matthieu Moy
Hi, Aleksey Mokhovikov moxobu...@gmail.com writes: This is a milliproject from git google summer of code page. The current code that selects the output message is quite easy to understand. So I tried to improve it by removing nested conditions and code duplication. The output string is

Re: [PATCH][GSOC] Selection of the verbose message is replaced with generated message in install_branch_config()

2014-03-17 Thread Eric Sunshine
Thanks for the submission. Comments below to give you a taste of the Git review process... On Mon, Mar 17, 2014 at 5:55 AM, Aleksey Mokhovikov moxobu...@gmail.com wrote: Subject: [GSOC] Selection of the verbose message is replaced with generated message in install_branch_config() Mentioning