<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/strbuf.h, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-06-29T21:17:26Z</updated>
<entry>
<title>Merge branch 'rs/retire-strbuf-write-fd'</title>
<updated>2020-06-29T21:17:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-06-29T21:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=610486749aca4ce9e5923baa70b072eff69a9867'/>
<id>urn:sha1:610486749aca4ce9e5923baa70b072eff69a9867</id>
<content type='text'>
A misdesigned strbuf_write_fd() function has been retired.

* rs/retire-strbuf-write-fd:
  strbuf: remove unreferenced strbuf_write_fd method.
  bugreport.c: replace strbuf_write_fd with write_in_full
</content>
</entry>
<entry>
<title>strbuf: remove unreferenced strbuf_write_fd method.</title>
<updated>2020-06-19T20:50:27Z</updated>
<author>
<name>Randall S. Becker</name>
<email>randall.becker@nexbridge.ca</email>
</author>
<published>2020-06-19T20:23:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f2b643e76d9a1330c1a02489c0787ca7d818633'/>
<id>urn:sha1:5f2b643e76d9a1330c1a02489c0787ca7d818633</id>
<content type='text'>
strbuf_write_fd was only used in bugreport.c. Since that file now uses
write_in_full, this method is no longer needed. In addition, strbuf_write_fd
did not guard against exceeding MAX_IO_SIZE for the platform, nor
provided error handling in the event of a failure if only partial data
was written to the file descriptor. Since already write_in_full has this
capability and is in general use, it should be used instead. The change
impacts strbuf.c and strbuf.h.

Signed-off-by: Randall S. Becker &lt;rsbecker@nexbridge.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/wildcard-credential'</title>
<updated>2020-05-05T21:54:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-05T21:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd65fc3960a972ab2f03b94d08f0e421d9ee22bb'/>
<id>urn:sha1:fd65fc3960a972ab2f03b94d08f0e421d9ee22bb</id>
<content type='text'>
Update the parser used for credential.&lt;URL&gt;.&lt;variable&gt;
configuration, to handle &lt;URL&gt;s with '/' in them correctly.

* bc/wildcard-credential:
  credential: fix matching URLs with multiple levels in path
</content>
</entry>
<entry>
<title>Merge branch 'es/bugreport'</title>
<updated>2020-05-01T20:39:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-01T20:39:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd094c2b75401f6e1e53e7a5bbfca3c66c44f556'/>
<id>urn:sha1:dd094c2b75401f6e1e53e7a5bbfca3c66c44f556</id>
<content type='text'>
The "bugreport" tool.

* es/bugreport:
  bugreport: drop extraneous includes
  bugreport: add compiler info
  bugreport: add uname info
  bugreport: gather git version and build info
  bugreport: add tool to generate debugging info
  help: move list_config_help to builtin/help
</content>
</entry>
<entry>
<title>credential: fix matching URLs with multiple levels in path</title>
<updated>2020-04-27T18:42:20Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-04-27T01:18:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b44d0118ac5074215ece7ae2bb86ad0713f70674'/>
<id>urn:sha1:b44d0118ac5074215ece7ae2bb86ad0713f70674</id>
<content type='text'>
46fd7b3900 ("credential: allow wildcard patterns when matching config",
2020-02-20) introduced support for matching credential helpers using
urlmatch.  In doing so, it introduced code to percent-encode the paths
we get from the credential helper so that they could be effectively
matched by the urlmatch code.

Unfortunately, that code had a bug: it percent-encoded the slashes in
the path, resulting in any URL path that contained multiple levels
(i.e., a directory component) not matching.

We are currently the only caller of the percent-encoding code and could
simply change it not to encode slashes.  However, we still want to
encode slashes in the username component, so we need to have both
behaviors available.

So instead, let's add a flag to control encoding slashes, which is the
behavior we want here, and use it when calling the code in this case.

Add a test for credential helper URLs using multiple slashes in the
path, which our test suite previously lacked, as well as one ensuring
that we handle usernames with slashes gracefully.  Since we're testing
other percent-encoding handling, let's add one for non-ASCII UTF-8
characters as well.

Reported-by: Ilya Tretyakov &lt;it@it3xl.ru&gt;
Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bugreport: add tool to generate debugging info</title>
<updated>2020-04-16T22:23:42Z</updated>
<author>
<name>Emily Shaffer</name>
<email>emilyshaffer@google.com</email>
</author>
<published>2020-04-16T21:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=238b439d69890980dafc5154895d425cb4cf4a5e'/>
<id>urn:sha1:238b439d69890980dafc5154895d425cb4cf4a5e</id>
<content type='text'>
Teach Git how to prompt the user for a good bug report: reproduction
steps, expected behavior, and actual behavior. Later, Git can learn how
to collect some diagnostic information from the repository.

If users can send us a well-written bug report which contains diagnostic
information we would otherwise need to ask the user for, we can reduce
the number of question-and-answer round trips between the reporter and
the Git contributor.

Users may also wish to send a report like this to their local "Git
expert" if they have put their repository into a state they are confused
by.

Signed-off-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: provide function to append whole lines</title>
<updated>2020-03-30T17:34:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2020-03-30T13:46:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd021f39103fab4c5ae53a4d1a1756f8970d00db'/>
<id>urn:sha1:bd021f39103fab4c5ae53a4d1a1756f8970d00db</id>
<content type='text'>
While the strbuf interface already provides functions to read a line
into it that completely replaces its current contents, we do not have an
interface that allows for appending lines without discarding current
contents.

Add a new function `strbuf_appendwholeline` that reads a line including
its terminating character into a strbuf non-destructively. This is a
preparatory step for git-update-ref(1) reading standard input line-wise
instead of as a block.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/wildcard-credential'</title>
<updated>2020-03-05T18:43:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-03-05T18:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2cbb0586697585995908c325a0c70aad37602274'/>
<id>urn:sha1:2cbb0586697585995908c325a0c70aad37602274</id>
<content type='text'>
A configuration element used for credential subsystem can now use
wildcard pattern to specify for which set of URLs the entry
applies.

* bc/wildcard-credential:
  credential: allow wildcard patterns when matching config
  credential: use the last matching username in the config
  t0300: add tests for some additional cases
  t1300: add test for urlmatch with multiple wildcards
  mailmap: add an additional email address for brian m. carlson
</content>
</entry>
<entry>
<title>credential: allow wildcard patterns when matching config</title>
<updated>2020-02-20T21:05:43Z</updated>
<author>
<name>brian m. carlson</name>
<email>bk2204@github.com</email>
</author>
<published>2020-02-20T02:24:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46fd7b390034eb5dde6a3f955e677c5260e4d10c'/>
<id>urn:sha1:46fd7b390034eb5dde6a3f955e677c5260e4d10c</id>
<content type='text'>
In some cases, a user will want to use a specific credential helper for
a wildcard pattern, such as https://*.corp.example.com.  We have code
that handles this already with the urlmatch code, so let's use that
instead of our custom code.

Since the urlmatch code is a superset of our current matching in terms
of capabilities, there shouldn't be any cases of things that matched
previously that don't match now.  However, in addition to wildcard
matching, we now use partial path matching, which can cause slightly
different behavior in the case that a helper applies to the prefix
(considering path components) of the remote URL.  While different, this
is probably the behavior people were wanting anyway.

Since we're using the urlmatch code, we need to encode the components
we've gotten into a URL to match, so add a function to percent-encode
data and format the URL with it.  We now also no longer need to the
custom code to match URLs, so let's remove it.

Additionally, the urlmatch code always looks for the best match, whereas
we want all matches for credential helpers to preserve existing
behavior.  Let's add an optional field, select_fn, that lets us control
which items we want (in this case, all of them) and default it to the
best-match code that already exists for other users.

Signed-off-by: brian m. carlson &lt;bk2204@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>strbuf: add and use strbuf_insertstr()</title>
<updated>2020-02-10T17:04:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-02-09T13:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a91cc7fad0d48984135abe2fb70c41db61b500c5'/>
<id>urn:sha1:a91cc7fad0d48984135abe2fb70c41db61b500c5</id>
<content type='text'>
Add a function for inserting a C string into a strbuf.  Use it
throughout the source to get rid of magic string length constants and
explicit strlen() calls.

Like strbuf_addstr(), implement it as an inline function to avoid the
implicit strlen() calls to cause runtime overhead.

Helped-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
