<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-backend.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-12-05T22:13:21Z</updated>
<entry>
<title>replace {pre,suf}fixcmp() with {starts,ends}_with()</title>
<updated>2013-12-05T22:13:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2013-11-30T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59556548230e617b837343c2c07e357e688e2ca4'/>
<id>urn:sha1:59556548230e617b837343c2c07e357e688e2ca4</id>
<content type='text'>
Leaving only the function definitions and declarations so that any
new topic in flight can still make use of the old functions, replace
existing uses of the prefixcmp() and suffixcmp() with new API
functions.

The change can be recreated by mechanically applying this:

    $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
      grep -v strbuf\\.c |
      xargs perl -pi -e '
        s|!prefixcmp\(|starts_with\(|g;
        s|prefixcmp\(|!starts_with\(|g;
        s|!suffixcmp\(|ends_with\(|g;
        s|suffixcmp\(|!ends_with\(|g;
      '

on the result of preparatory changes in this series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/http-backend-allow-405'</title>
<updated>2013-09-20T19:30:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-20T19:30:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=26e53f8ac02a5929e4b614010afaa9787f567698'/>
<id>urn:sha1:26e53f8ac02a5929e4b614010afaa9787f567698</id>
<content type='text'>
When the webserver responds with "405 Method Not Allowed", it
should tell the client what methods are allowed with the "Allow"
header.

* bc/http-backend-allow-405:
  http-backend: provide Allow header for 405
</content>
</entry>
<entry>
<title>http-backend: provide Allow header for 405</title>
<updated>2013-09-12T15:44:44Z</updated>
<author>
<name>Brian M. Carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2013-09-12T00:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9247be05cf686dc98dd504f8f9fb0f07da1a29d1'/>
<id>urn:sha1:9247be05cf686dc98dd504f8f9fb0f07da1a29d1</id>
<content type='text'>
The HTTP 1.1 standard requires an Allow header for 405 Method Not Allowed:

  The response MUST include an Allow header containing a list of valid methods
  for the requested resource.

So provide such a header when we return a 405 to the user agent.

Signed-off-by: Brian M. Carlson &lt;sandals@crustytoothpaste.net&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>show_head_ref(): rename first parameter to "refname"</title>
<updated>2013-06-02T22:28:47Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2013-05-25T09:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3e4ca43fd0ea0f6a150de3be096b52954d64f523'/>
<id>urn:sha1:3e4ca43fd0ea0f6a150de3be096b52954d64f523</id>
<content type='text'>
This is the usual convention.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>show_head_ref(): do not shadow name of argument</title>
<updated>2013-06-02T22:28:47Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2013-05-25T09:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d811dbd04afc9fd4e59d1a1a2c090abb835d55f'/>
<id>urn:sha1:1d811dbd04afc9fd4e59d1a1a2c090abb835d55f</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-dumb-namespaces'</title>
<updated>2013-04-18T18:49:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-18T18:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77354d8cdc6e0bf407de23d762760cccee5d757c'/>
<id>urn:sha1:77354d8cdc6e0bf407de23d762760cccee5d757c</id>
<content type='text'>
Allow smart-capable HTTP servers to be restricted via the
GIT_NAMESPACE mechanism when talking with commit-walker clients
(they already do so when talking with smart HTTP clients).

* jk/http-dumb-namespaces:
  http-backend: respect GIT_NAMESPACE with dumb clients
</content>
</entry>
<entry>
<title>http-backend: respect GIT_NAMESPACE with dumb clients</title>
<updated>2013-04-10T01:06:44Z</updated>
<author>
<name>John Koleszar</name>
<email>jkoleszar@google.com</email>
</author>
<published>2013-04-10T00:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6130f86deabe15c78d966b3588f47dbd653ec4fa'/>
<id>urn:sha1:6130f86deabe15c78d966b3588f47dbd653ec4fa</id>
<content type='text'>
Filter the list of refs returned via the dumb HTTP protocol according
to the active namespace, consistent with other clients of the
upload-pack service.

Signed-off-by: John Koleszar &lt;jkoleszar@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pkt-line: drop safe_write function</title>
<updated>2013-02-20T21:42:21Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-02-20T20:01:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdf4fb8e332f9641ac1ca95e999fe98251d31392'/>
<id>urn:sha1:cdf4fb8e332f9641ac1ca95e999fe98251d31392</id>
<content type='text'>
This is just write_or_die by another name. The one
distinction is that write_or_die will treat EPIPE specially
by suppressing error messages. That's fine, as we die by
SIGPIPE anyway (and in the off chance that it is disabled,
write_or_die will simulate it).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-backend: respect existing GIT_COMMITTER_* variables</title>
<updated>2012-03-30T16:13:02Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-03-30T07:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e32a4581bcbf1cf43cd5069a0d19df07542d612a'/>
<id>urn:sha1:e32a4581bcbf1cf43cd5069a0d19df07542d612a</id>
<content type='text'>
The http-backend program sets default GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL variables based on the REMOTE_USER and
REMOTE_ADDR variables provided by the webserver. However, it
unconditionally overwrites any existing GIT_COMMITTER
variables, which may have been customized by site-specific
code in the webserver (or in a script wrapping http-backend).

Let's leave those variables intact if they already exist,
assuming that any such configuration was intentional. There
is a slight chance of a regression if somebody has set
GIT_COMMITTER_* for the entire webserver, not intending it
to leak through http-backend. We could protect against this
by passing the information in alternate variables.  However,
it seems unlikely that anyone will care about that
regression, and there is value in the simplicity of using
the common variable names that are used elsewhere in git.

While we're tweaking the environment-handling in
http-backend, let's switch it to use argv_array to handle
the list of variables. That makes the memory management much
simpler.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: add infrastructure for translating Git with gettext</title>
<updated>2011-12-06T04:46:55Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2011-11-17T23:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5e9637c629702e3d41ad01d95956d1835d7338e0'/>
<id>urn:sha1:5e9637c629702e3d41ad01d95956d1835d7338e0</id>
<content type='text'>
Change the skeleton implementation of i18n in Git to one that can show
localized strings to users for our C, Shell and Perl programs using
either GNU libintl or the Solaris gettext implementation.

This new internationalization support is enabled by default. If
gettext isn't available, or if Git is compiled with
NO_GETTEXT=YesPlease, Git falls back on its current behavior of
showing interface messages in English. When using the autoconf script
we'll auto-detect if the gettext libraries are installed and act
appropriately.

This change is somewhat large because as well as adding a C, Shell and
Perl i18n interface we're adding a lot of tests for them, and for
those tests to work we need a skeleton PO file to actually test
translations. A minimal Icelandic translation is included for this
purpose. Icelandic includes multi-byte characters which makes it easy
to test various edge cases, and it's a language I happen to
understand.

The rest of the commit message goes into detail about various
sub-parts of this commit.

= Installation

Gettext .mo files will be installed and looked for in the standard
$(prefix)/share/locale path. GIT_TEXTDOMAINDIR can also be set to
override that, but that's only intended to be used to test Git itself.

= Perl

Perl code that's to be localized should use the new Git::I18n
module. It imports a __ function into the caller's package by default.

Instead of using the high level Locale::TextDomain interface I've
opted to use the low-level (equivalent to the C interface)
Locale::Messages module, which Locale::TextDomain itself uses.

Locale::TextDomain does a lot of redundant work we don't need, and
some of it would potentially introduce bugs. It tries to set the
$TEXTDOMAIN based on package of the caller, and has its own
hardcoded paths where it'll search for messages.

I found it easier just to completely avoid it rather than try to
circumvent its behavior. In any case, this is an issue wholly
internal Git::I18N. Its guts can be changed later if that's deemed
necessary.

See &lt;AANLkTilYD_NyIZMyj9dHtVk-ylVBfvyxpCC7982LWnVd@mail.gmail.com&gt; for
a further elaboration on this topic.

= Shell

Shell code that's to be localized should use the git-sh-i18n
library. It's basically just a wrapper for the system's gettext.sh.

If gettext.sh isn't available we'll fall back on gettext(1) if it's
available. The latter is available without the former on Solaris,
which has its own non-GNU gettext implementation. We also need to
emulate eval_gettext() there.

If neither are present we'll use a dumb printf(1) fall-through
wrapper.

= About libcharset.h and langinfo.h

We use libcharset to query the character set of the current locale if
it's available. I.e. we'll use it instead of nl_langinfo if
HAVE_LIBCHARSET_H is set.

The GNU gettext manual recommends using langinfo.h's
nl_langinfo(CODESET) to acquire the current character set, but on
systems that have libcharset.h's locale_charset() using the latter is
either saner, or the only option on those systems.

GNU and Solaris have a nl_langinfo(CODESET), FreeBSD can use either,
but MinGW and some others need to use libcharset.h's locale_charset()
instead.

=Credits

This patch is based on work by Jeff Epler &lt;jepler@unpythonic.net&gt; who
did the initial Makefile / C work, and a lot of comments from the Git
mailing list, including Jonathan Nieder, Jakub Narebski, Johannes
Sixt, Erik Faye-Lund, Peter Krefting, Junio C Hamano, Thomas Rast and
others.

[jc: squashed a small Makefile fix from Ramsay]

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
