<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/quote.h, branch v2.4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.9</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-12-01T19:32:34Z</updated>
<entry>
<title>ls-tree: remove path filtering logic in show_tree</title>
<updated>2014-12-01T19:32:34Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-11-30T09:05:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1cf9952db243c624cc2763fa74e98adbb38537b1'/>
<id>urn:sha1:1cf9952db243c624cc2763fa74e98adbb38537b1</id>
<content type='text'>
ls-tree uses read_tree_recursive() which already does path filtering
using pathspec. No need to filter one more time based on prefix
only. "ls-tree ../somewhere" does not work because of
this. write_name_quotedpfx() can now be retired because nobody else
uses it.

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>quote: remove sq_quote_print()</title>
<updated>2013-07-30T15:13:38Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2013-07-30T08:31:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82aae5c1e550ef2244221c9badd69771115053a5'/>
<id>urn:sha1:82aae5c1e550ef2244221c9badd69771115053a5</id>
<content type='text'>
Remove sq_quote_print() since it has no callers.

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
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>for-each-ref, quote: convert *_quote_print -&gt; *_quote_buf</title>
<updated>2013-07-30T15:06:27Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-07-30T08:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=10d0167fef35c7a4e4e3ef9dd448594b62089c5a'/>
<id>urn:sha1:10d0167fef35c7a4e4e3ef9dd448594b62089c5a</id>
<content type='text'>
The print_value() function in for-each-ref.c prints values to stdout
immediately using {sq|perl|python|tcl}_quote_print().  Change these
lower-level quote functions to instead leave their results in strbuf
so that we can later add post-processing to the results of them.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>write_name{_quoted_relative,}(): remove redundant parameters</title>
<updated>2013-06-26T18:22:06Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2013-06-25T15:53:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e9a820cefde2170840fbcdf7c4b74369988869dc'/>
<id>urn:sha1:e9a820cefde2170840fbcdf7c4b74369988869dc</id>
<content type='text'>
After substitute path_relative() in quote.c with relative_path()
from path.c, parameters (such as len and prefix_len) are redundant
in function write_name() and write_name_quoted_relative().  The
callers have already been audited that the strings they pass are
properly NUL terminated and the length they give are the length of
the string (or -1 that asks the length to be counted by the callee).

Remove these now-redundant parameters.

Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote_path_relative(): remove redundant parameter</title>
<updated>2013-06-26T18:16:48Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2013-06-25T15:53:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39598f9983f759b5e38b9e762c695bad6c89a1b3'/>
<id>urn:sha1:39598f9983f759b5e38b9e762c695bad6c89a1b3</id>
<content type='text'>
quote_path_relative() used to take a counted string as its parameter
(the string to be quoted).  With an earlier change, it now uses
relative_path() that does not take a counted string, and we have
been passing only the pointer to the string since then.

Remove the length parameter from quote_path_relative() to show that
this parameter was redundant.  All the changed lines show that the
caller passed either -1 (to ask the function run strlen() on the
string), or the length of the string, so the earlier conversion was
safe.

All the callers of quote_path_relative() that used to take counted string
have been audited to make sure that they are passing length of the actual
string (or -1 to ask the callee run strlen())

Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote: provide sq_dequote_to_argv_array</title>
<updated>2011-09-14T18:56:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-09-13T21:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=37e8161a04360d01edd0611135f5eae8e6a08224'/>
<id>urn:sha1:37e8161a04360d01edd0611135f5eae8e6a08224</id>
<content type='text'>
This is similar to sq_dequote_to_argv, but more convenient
if you have an argv_array. It's tempting to just feed the
components of the argv_array to sq_dequote_to_argv instead,
but:

  1. It wouldn't maintain the NULL-termination invariant
     of argv_array.

  2. It doesn't match the memory ownership policy of
     argv_array (in which each component is free-able, not a
     pointer into a separate buffer).

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.h: fix bogus comment</title>
<updated>2011-09-14T18:44:05Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-09-13T21:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7878b07c0d86d05fa505f2464557c69addcc2c05'/>
<id>urn:sha1:7878b07c0d86d05fa505f2464557c69addcc2c05</id>
<content type='text'>
Commit 758e915 made sq_quote_next static, removing it from
quote.h. However, it forgot to update the related comment,
making it appear as a confusing description of sq_quote_to_argv.

Let's remove the crufty bits, and elaborate more on sq_quote_to_argv.

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.h: simplify the inclusion</title>
<updated>2011-02-07T23:15:17Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2011-01-05T00:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf548cacdd0c553b6524969d0d3fd5e787efeb3c'/>
<id>urn:sha1:cf548cacdd0c553b6524969d0d3fd5e787efeb3c</id>
<content type='text'>
Attempting to include quote.h without first including strbuf.h results
in warnings:

 ./quote.h:33:33: warning: ‘struct strbuf’ declared inside parameter list
 ./quote.h:33:33: warning: its scope is only this definition or declaration, which is probably not what you want
 ./quote.h:34:34: warning: ‘struct strbuf’ declared inside parameter list
 ...

Add a toplevel declaration for struct strbuf to avoid this.

While at it, stop including system headers from quote.h.  git source
files already need to include git-compat-util.h sooner to ensure the
appropriate feature test macros are defined.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote.c: separate quoting and relative path generation</title>
<updated>2010-06-05T16:14:13Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2010-06-03T13:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b167cffb6b38a092e8f9e0e396c1931ee1dc8b7d'/>
<id>urn:sha1:b167cffb6b38a092e8f9e0e396c1931ee1dc8b7d</id>
<content type='text'>
This is in preparation of relative path support for ls-files, which
quotes a path only if the line terminator is not the NUL character.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>quote.c: mark file-local function static</title>
<updated>2010-01-12T09:06:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-12T06:31:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=758e915b8a220ebe967edf745eb699b30d501993'/>
<id>urn:sha1:758e915b8a220ebe967edf745eb699b30d501993</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
