<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/quote.h, branch v1.8.0.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-09-14T18:56:49Z</updated>
<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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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.stealer.net/cgit.cgi/user/sven/git.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>
<entry>
<title>quote: add "sq_dequote_to_argv" to put unwrapped args in an argv array</title>
<updated>2009-03-30T08:22:53Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-03-29T09:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=eaa759b9141f125d7e55a4b08b60497845d3c52e'/>
<id>urn:sha1:eaa759b9141f125d7e55a4b08b60497845d3c52e</id>
<content type='text'>
This new function unwraps the space separated shell quoted elements in
its first argument and places them in the argv array passed as its second
argument.

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>quote: implement "sq_dequote_many" to unwrap many args in one string</title>
<updated>2009-03-30T08:22:53Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-03-29T09:44:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ebbc088e13e1bf0dbf8eb08b00519602c176f864'/>
<id>urn:sha1:ebbc088e13e1bf0dbf8eb08b00519602c176f864</id>
<content type='text'>
The sq_dequote() function does not allow parsing a string with more than
one single-quoted parameter easily; use its code to implement a new API
sq_dequote_step() to allow the caller iterate through such a string to
parse them one-by-one.  The original sq_dequote() becomes a thin wrapper
around it.

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>Make private quote_path() in wt-status.c available as quote_path_relative()</title>
<updated>2008-03-08T05:22:25Z</updated>
<author>
<name>Dmitry Potapov</name>
<email>dpotapov@gmail.com</email>
</author>
<published>2008-03-07T02:30:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a734d0b10bd0f5554abb3acdf11426040cfc4df0'/>
<id>urn:sha1:a734d0b10bd0f5554abb3acdf11426040cfc4df0</id>
<content type='text'>
Move quote_path() from wt-status.c to quote.c and rename it as
quote_path_relative(), because it is a better name for a public function.

Also, instead of handcrafted quoting, quote_c_style_counted() is now used,
to make its quoting more consistent with the rest of the system, also
honoring core.quotepath specified in configuration.

Signed-off-by: Dmitry Potapov &lt;dpotapov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix rewrite_diff() name quoting.</title>
<updated>2007-12-27T01:13:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-12-27T01:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d56250911f4ec074048f4edb34551eaf384172cc'/>
<id>urn:sha1:d56250911f4ec074048f4edb34551eaf384172cc</id>
<content type='text'>
This moves the logic to quote two paths (prefix + path) in
C-style introduced in the previous commit from the
dump_quoted_path() in combine-diff.c to quote.c, and uses it to
fix rewrite_diff() that never C-quoted the pathnames correctly.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Trace and quote with argv: get rid of unneeded count argument.</title>
<updated>2007-12-04T06:11:53Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2007-12-03T04:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b319ce4c14f7fe0ee469a3f9def1098d84177849'/>
<id>urn:sha1:b319ce4c14f7fe0ee469a3f9def1098d84177849</id>
<content type='text'>
Now that str_buf takes care of all the allocations, there is
no more gain to pass an argument count.

So this patch removes the "count" argument from:
	- "sq_quote_argv"
	- "trace_argv_printf"
and all the callers.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
