From: Eric Sunshine Date: Fri, 11 Jul 2014 22:29:03 GMT Subject: Re: [PATCH v3] http: Add Accept-Language header if possible Message-ID: In-Reply-To: <20140711173544.GB7856@sigill.intra.peff.net> On Fri, Jul 11, 2014 at 1:35 PM, Jeff King wrote: > On Sat, Jul 12, 2014 at 01:52:53AM +0900, Yi EungJun wrote: >> Add an Accept-Language header which indicates the user's preferred >> languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. >> >> Examples: >> LANGUAGE= -> "" >> LANGUAGE=ko:en -> "Accept-Language: ko, en; q=0.9, *; q=0.1" >> LANGUAGE=ko LANG=en_US.UTF-8 -> "Accept-Language: ko, *; q=0.1" >> LANGUAGE= LANG=en_US.UTF-8 -> "Accept-Language: en-US, *; q=0.1" >> >> This gives git servers a chance to display remote error messages in >> the user's preferred language. > > Thanks, this is looking much nicer. Most of my comments are on style: > >> +static const char* get_preferred_languages() { >> + const char* retval; > > A few style nits: Also, this is C, not C++, so don't forget void: static const char *get_preferred_languages(void) { > 1. We usually put a function's opening brace on a new line. > > 2. We usually put the asterisk in a pointer declaration with the > variable name ("const char *retval"). This one appears elsewhere in > the patch. > > 3. This line seems to be indented with spaces instead of tabs.