<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/url.c, branch v2.50.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.50.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.50.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-09-29T22:14:56Z</updated>
<entry>
<title>hex-ll: separate out non-hash-algo functions</title>
<updated>2023-09-29T22:14:56Z</updated>
<author>
<name>Calvin Wan</name>
<email>calvinwan@google.com</email>
</author>
<published>2023-09-29T21:20:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d88e8106e892109f4f4b13312dd026d0a7fcfeec'/>
<id>urn:sha1:d88e8106e892109f4f4b13312dd026d0a7fcfeec</id>
<content type='text'>
In order to further reduce all-in-one headers, separate out functions in
hex.h that do not operate on object hashes into its own file, hex-ll.h,
and update the include directives in the .c files that need only such
functions accordingly.

Signed-off-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: replace cache.h with more direct headers, where possible</title>
<updated>2023-02-24T01:25:30Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc7bd51b06424694c2e3dd97c11fa095d84d52b1'/>
<id>urn:sha1:fc7bd51b06424694c2e3dd97c11fa095d84d52b1</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cache.h: remove dependence on hex.h; make other files include it explicitly</title>
<updated>2023-02-24T01:25:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41771fa435a44ff8be3f23753bde0309a2a65b03'/>
<id>urn:sha1:41771fa435a44ff8be3f23753bde0309a2a65b03</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix spelling errors in code comments</title>
<updated>2019-11-10T07:00:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15beaaa3d1f6b555900446deb5e376b4f806d734'/>
<id>urn:sha1:15beaaa3d1f6b555900446deb5e376b4f806d734</id>
<content type='text'>
Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>list-objects-filter: implement composite filters</title>
<updated>2019-06-28T15:41:53Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2019-06-27T22:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e987df5fe62b8b29be4cdcdeb3704681ada2b29e'/>
<id>urn:sha1:e987df5fe62b8b29be4cdcdeb3704681ada2b29e</id>
<content type='text'>
Allow combining filters such that only objects accepted by all filters
are shown. The motivation for this is to allow getting directory
listings without also fetching blobs. This can be done by combining
blob:none with tree:&lt;depth&gt;. There are massive repositories that have
larger-than-expected trees - even if you include only a single commit.

A combined filter supports any number of subfilters, and is written in
the following form:

	combine:&lt;filter 1&gt;+&lt;filter 2&gt;+&lt;filter 3&gt;

Certain non-alphanumeric characters in each filter must be
URL-encoded.

For now, combined filters must be specified in this form. In a
subsequent commit, rev-list will support multiple --filter arguments
which will have the same effect as specifying one filter argument
starting with "combine:". The documentation will be updated in that
commit, as the URL-encoding scheme is in general not meant to be used
directly by the user, and it is better to describe the URL-encoding
feature in terms of the repeated flag.

Helped-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Helped-by: Jeff Hostetler &lt;git@jeffhostetler.com&gt;
Helped-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Helped-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>url: do not allow %00 to represent NUL in URLs</title>
<updated>2019-06-04T21:48:25Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2019-06-04T17:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d37dc239a427a367427f9c4fdf12a148ad811968'/>
<id>urn:sha1:d37dc239a427a367427f9c4fdf12a148ad811968</id>
<content type='text'>
There is no reason to allow %00 to terminate a string, so do not allow it.
Otherwise, we end up returning arbitrary content in the string (that which is
after the %00) which is effectively hidden from callers and can escape sanity
checks and validation, and possible be used in tandem with a security
vulnerability to introduce a payload.

Helped-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>url: do not read past end of buffer</title>
<updated>2019-06-04T21:48:06Z</updated>
<author>
<name>Matthew DeVore</name>
<email>matvore@google.com</email>
</author>
<published>2019-06-04T17:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f6b8a6177f3197ddad82a6da2ff9b4704664f5d'/>
<id>urn:sha1:3f6b8a6177f3197ddad82a6da2ff9b4704664f5d</id>
<content type='text'>
url_decode_internal could have been tricked into reading past the length
of the **query buffer if there are fewer than 2 characters after a % (in
a null-terminated string, % would have to be the last character).
Prevent this from happening by checking len before decoding the %
sequence.

Helped-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Matthew DeVore &lt;matvore@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>style: the opening '{' of a function is in a separate line</title>
<updated>2018-12-10T06:41:09Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-12-09T10:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b3357626edc841a51d8885ddf6986bab5b6f778'/>
<id>urn:sha1:3b3357626edc841a51d8885ddf6986bab5b6f778</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>introduce hex2chr() for converting two hexadecimal digits to a character</title>
<updated>2016-09-07T17:42:46Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-03T15:59:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d23309733a5b2a9e1adc304ee50c5a5ed7a087c2'/>
<id>urn:sha1:d23309733a5b2a9e1adc304ee50c5a5ed7a087c2</id>
<content type='text'>
Add and use a helper function that decodes the char value of two
hexadecimal digits.  It returns a negative number on error, avoids
running over the end of the given string and doesn't shift negative
values.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use strbuf_complete to conditionally append slash</title>
<updated>2015-10-05T18:08:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=00b6c178c3ab475098f7a0bc63b2df2da508020c'/>
<id>urn:sha1:00b6c178c3ab475098f7a0bc63b2df2da508020c</id>
<content type='text'>
When working with paths in strbufs, we frequently want to
ensure that a directory contains a trailing slash before
appending to it. We can shorten this code (and make the
intent more obvious) by calling strbuf_complete.

Most of these cases are trivially identical conversions, but
there are two things to note:

  - in a few cases we did not check that the strbuf is
    non-empty (which would lead to an out-of-bounds memory
    access). These were generally not triggerable in
    practice, either from earlier assertions, or typically
    because we would have just fed the strbuf to opendir(),
    which would choke on an empty path.

  - in a few cases we indexed the buffer with "original_len"
    or similar, rather than the current sb-&gt;len, and it is
    not immediately obvious from the diff that they are the
    same. In all of these cases, I manually verified that
    the strbuf does not change between the assignment and
    the strbuf_complete call.

This does not convert cases which look like:

  if (sb-&gt;len &amp;&amp; !is_dir_sep(sb-&gt;buf[sb-&gt;len - 1]))
	  strbuf_addch(sb, '/');

as those are obviously semantically different. Some of these
cases arguably should be doing that, but that is out of
scope for this change, which aims purely for cleanup with no
behavior change (and at least it will make such sites easier
to find and examine in the future, as we can grep for
strbuf_complete).

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
