<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/quote.h, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-04-11T15:52:11Z</updated>
<entry>
<title>mailmap, quote: move declarations of global vars to correct unit</title>
<updated>2023-04-11T15:52:11Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-11T07:42:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4711556905f381c01f1fbae205f67cfa673ab44a'/>
<id>urn:sha1:4711556905f381c01f1fbae205f67cfa673ab44a</id>
<content type='text'>
Since earlier commits removed the inclusion of cache.h from mailmap.c
and quote.c, it feels odd to have the extern declarations of
global variables in cache.h rather than the actual header included
by the source file.  Move these global variable extern declarations
from cache.h to mailmap.c and quote.c.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Acked-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'zh/ref-filter-raw-data'</title>
<updated>2021-08-24T22:32:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-08-24T22:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bda891e6647538693d6cec5d3085f1508fbb5f5f'/>
<id>urn:sha1:bda891e6647538693d6cec5d3085f1508fbb5f5f</id>
<content type='text'>
Prepare the "ref-filter" machinery that drives the "--format"
option of "git for-each-ref" and its friends to be used in "git
cat-file --batch".

* zh/ref-filter-raw-data:
  ref-filter: add %(rest) atom
  ref-filter: use non-const ref_format in *_atom_parser()
  ref-filter: --format=%(raw) support --perl
  ref-filter: add %(raw) atom
  ref-filter: add obj-type check in grab contents
</content>
</entry>
<entry>
<title>ref-filter: --format=%(raw) support --perl</title>
<updated>2021-07-26T19:01:25Z</updated>
<author>
<name>ZheNing Hu</name>
<email>adlternative@gmail.com</email>
</author>
<published>2021-07-26T03:26:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7121c4d4e2877115fb372b3f147fad4cd1306751'/>
<id>urn:sha1:7121c4d4e2877115fb372b3f147fad4cd1306751</id>
<content type='text'>
Because the perl language can handle binary data correctly,
add the function perl_quote_buf_with_len(), which can specify
the length of the data and prevent the data from being truncated
at '\0' to help `--format="%(raw)"` support `--perl`.

Reviewed-by: Jacob Keller &lt;jacob.keller@gmail.com&gt;
Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: ZheNing Hu &lt;adlternative@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*.h: add a few missing __attribute__((format))</title>
<updated>2021-07-13T22:20:20Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-07-13T08:05:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75d31ceec5870c94c934264b7a9afe029b787410'/>
<id>urn:sha1:75d31ceec5870c94c934264b7a9afe029b787410</id>
<content type='text'>
Add missing format attributes to API functions that take printf
arguments.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote: make sq_dequote_step() a public function</title>
<updated>2021-01-12T20:03:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-01-12T12:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13c44953fb0b396d3594b4a712f956ab3a48169e'/>
<id>urn:sha1:13c44953fb0b396d3594b4a712f956ab3a48169e</id>
<content type='text'>
We provide a function for dequoting an entire string, as well as one for
handling a space-separated list of quoted strings. But there's no way
for a caller to parse a string like 'foo'='bar', even though it is easy
to generate one using sq_quote_buf() or similar.

Let's make the single-step function available to callers outside of
quote.c. Note that we do need to adjust its implementation slightly: it
insists on seeing whitespace between items, and we'd like to be more
flexible than that. Since it only has a single caller, we can move that
check (and slurping up any extra whitespace) into that caller.

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>quote: turn 'nodq' parameter into a set of flags</title>
<updated>2020-09-10T20:08:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-10T17:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7c37c9750a0b402a68c73d0e4644f538a026d121'/>
<id>urn:sha1:7c37c9750a0b402a68c73d0e4644f538a026d121</id>
<content type='text'>
quote_c_style() and its friend quote_two_c_style() both take an
optional "please omit the double quotes around the quoted body"
parameter.  Turn it into a flag word, assign one bit out of it,
and call it CQUOTE_NODQ bit.

No behaviour change intended.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote_path: optionally allow quoting a path with SP in it</title>
<updated>2020-09-10T17:49:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-10T17:01:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3fc4a1b8680c114defd98ce6f2429f8946a5dc1'/>
<id>urn:sha1:f3fc4a1b8680c114defd98ce6f2429f8946a5dc1</id>
<content type='text'>
Some code in wt-status.c special case a path with SP in it, which
usually does not have to be c-quoted, and ensure that such a path
does get quoted.  Move the logic to quote_path() and give it a bit
in the flags word, QUOTE_PATH_QUOTE_SP.

No behaviour change intended.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote_path: give flags parameter to quote_path()</title>
<updated>2020-09-10T17:49:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-10T17:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88910c9939cee927a3ed1acca8d33a30c90b8fe5'/>
<id>urn:sha1:88910c9939cee927a3ed1acca8d33a30c90b8fe5</id>
<content type='text'>
The quote_path() function computes a path (relative to its base
directory) and c-quotes the result if necessary.  Teach it to take a
flags parameter to allow its behaviour to be enriched later.

No behaviour change intended.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote_path: rename quote_path_relative() to quote_path()</title>
<updated>2020-09-10T17:49:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-10T17:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c34d24b8a4d776a0046261b7fc6d0900ea94cc52'/>
<id>urn:sha1:c34d24b8a4d776a0046261b7fc6d0900ea94cc52</id>
<content type='text'>
There is no quote_path_absolute() or anything that causes confusion,
and one of the two large consumers already rename the long name
locally with a preprocessor macro.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote: rename sq_dequote_to_argv_array to mention strvec</title>
<updated>2020-07-28T22:02:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-07-28T20:24:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2745b6b4505ae11d6821c1d451169727b558a079'/>
<id>urn:sha1:2745b6b4505ae11d6821c1d451169727b558a079</id>
<content type='text'>
We want to eventually drop the use of the "argv_array" name in favor of
"strvec." Unlike most other uses of the name, this one is embedded in a
function name, so the definition and all of the callers need to be
updated at the same time.

We don't technically need to update the parameter types here (our
preprocessor compat macros make the two names interchangeable), but
let's do so to keep the site consistent for now.

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