Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Junio C Hamano
Jeff King writes: > On Thu, Feb 26, 2015 at 05:36:03PM -0500, Jeff King wrote: > >> > [-Wstrict-prototypes] >> > const char *get_preferred_languages(); >> > ^ >> >> Hmph. The compiler is right that it should be: >> >> const char *get_preferred_languages(void); >> >> but my gcc (4.9.2, with

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Jeff King
On Thu, Feb 26, 2015 at 05:36:03PM -0500, Jeff King wrote: > > [-Wstrict-prototypes] > > const char *get_preferred_languages(); > > ^ > > Hmph. The compiler is right that it should be: > > const char *get_preferred_languages(void); > > but my gcc (4.9.2, with -Wstrict_prototypes) does not se

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Jeff King
On Thu, Feb 26, 2015 at 02:26:05PM -0800, Stefan Beller wrote: > On Thu, Feb 26, 2015 at 2:07 PM, Jeff King wrote: > > > > Here it is, with the commit message and the missing hunk. This works for > > me both with and without NO_GETTEXT defined. > > This compiles here though a warning is spit: >

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Stefan Beller
On Thu, Feb 26, 2015 at 2:07 PM, Jeff King wrote: > > Here it is, with the commit message and the missing hunk. This works for > me both with and without NO_GETTEXT defined. This compiles here though a warning is spit: In file included from cache.h:8:0, from userdiff.c:1: gettext

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Junio C Hamano
Jeff King writes: > On Thu, Feb 26, 2015 at 01:47:34PM -0800, Stefan Beller wrote: > >> On Thu, Feb 26, 2015 at 1:42 PM, Junio C Hamano wrote:> >> > Here is what I queued. Thanks. >> >> I did not follow the thread if there are any intermediate patches, >> though it applied cleanly. > > What Ju

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Jeff King
On Thu, Feb 26, 2015 at 05:06:10PM -0500, Jeff King wrote: > On Thu, Feb 26, 2015 at 01:47:34PM -0800, Stefan Beller wrote: > > > On Thu, Feb 26, 2015 at 1:42 PM, Junio C Hamano wrote:> > > > Here is what I queued. Thanks. > > > > I did not follow the thread if there are any intermediate patch

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Jeff King
On Thu, Feb 26, 2015 at 01:47:34PM -0800, Stefan Beller wrote: > On Thu, Feb 26, 2015 at 1:42 PM, Junio C Hamano wrote:> > > Here is what I queued. Thanks. > > I did not follow the thread if there are any intermediate patches, > though it applied cleanly. What Junio posted is missing the hunk

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Stefan Beller
On Thu, Feb 26, 2015 at 1:42 PM, Junio C Hamano wrote:> > Here is what I queued. Thanks. I did not follow the thread if there are any intermediate patches, though it applied cleanly. Applying this on top of f18604bbf2c391c689a41fca14cbaeff5e106255 (http: add Accept-Language header if possible)

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Junio C Hamano
Jeff King writes: > On Thu, Feb 26, 2015 at 12:59:56PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > Perhaps it would be less risky to stick get_preferred_languages() into >> > gettext.c, like the patch below. Then we do not have to worry about >> > locale.h introducing other disr

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Jeff King
On Thu, Feb 26, 2015 at 12:59:56PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Perhaps it would be less risky to stick get_preferred_languages() into > > gettext.c, like the patch below. Then we do not have to worry about > > locale.h introducing other disruptive includes. The functio

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-26 Thread Junio C Hamano
Jeff King writes: > Perhaps it would be less risky to stick get_preferred_languages() into > gettext.c, like the patch below. Then we do not have to worry about > locale.h introducing other disruptive includes. The function is not > technically about gettext, but it seems reasonable to me to stuf

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-25 Thread Jeff King
On Wed, Feb 25, 2015 at 10:04:16PM -0500, Jeff King wrote: > Another variant of this would for gettext.c to provide a git_setlocale > that just wraps setlocale (and does nothing when NO_GETTEXT is given). This doesn't _quite_ work. In addition to the function, we have to have LC_MESSAGES defined.

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-25 Thread Jeff King
On Wed, Feb 25, 2015 at 02:52:26PM -0800, Junio C Hamano wrote: > This is now in 'master', but I wonder if people are getting > compilation errors because of this change. I do. I usually compile with NO_GETTEXT, but if I stop doing so, I see the problem, too. > I really do not like a conditiona

Re: [PATCH v9 1/1] http: Add Accept-Language header if possible

2015-02-25 Thread Junio C Hamano
Yi EungJun writes: > From: Yi EungJun > > Add an Accept-Language header which indicates the user's preferred > languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. > ... > Signed-off-by: Yi EungJun > --- Yikes. This is now in 'master', but I wonder if people are getting compilatio

[PATCH v9 1/1] http: Add Accept-Language header if possible

2015-01-28 Thread Yi EungJun
From: Yi EungJun 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, *;