<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/quote.c, branch v1.6.4.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2009-06-21T04:52:55Z</updated>
<entry>
<title>Fix various sparse warnings in the git source code</title>
<updated>2009-06-21T04:52:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-06-18T17:28:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2af202be3d2f128c6974290cabe13179c6462196'/>
<id>urn:sha1:2af202be3d2f128c6974290cabe13179c6462196</id>
<content type='text'>
There are a few remaining ones, but this fixes the trivial ones. It boils
down to two main issues that sparse complains about:

 - warning: Using plain integer as NULL pointer

   Sparse doesn't like you using '0' instead of 'NULL'. For various good
   reasons, not the least of which is just the visual confusion. A NULL
   pointer is not an integer, and that whole "0 works as NULL" is a
   historical accident and not very pretty.

   A few of these remain: zlib is a total mess, and Z_NULL is just a 0.
   I didn't touch those.

 - warning: symbol 'xyz' was not declared. Should it be static?

   Sparse wants to see declarations for any functions you export. A lack
   of a declaration tends to mean that you should either add one, or you
   should mark the function 'static' to show that it's in file scope.

   A few of these remain: I only did the ones that should obviously just
   be made static.

That 'wt_status_submodule_summary' one is debatable. It has a few related
flags (like 'wt_status_use_color') which _are_ declared, and are used by
builtin-commit.c. So maybe we'd like to export it at some point, but it's
not declared now, and not used outside of that file, so 'static' it is in
this patch.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
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>shrink git-shell by avoiding redundant dependencies</title>
<updated>2008-06-28T06:22:00Z</updated>
<author>
<name>Dmitry Potapov</name>
<email>dpotapov@gmail.com</email>
</author>
<published>2008-06-27T20:46:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5b8e6f85f971dba8eeac048e7821978bbca14121'/>
<id>urn:sha1:5b8e6f85f971dba8eeac048e7821978bbca14121</id>
<content type='text'>
A lot of modules that have nothing to do with git-shell functionality
were linked in, bloating git-shell more than 8 times.

This patch cuts off redundant dependencies by:
1. providing stubs for three functions that make no sense for git-shell;
2. moving quote_path_fully from environment.c to quote.c to make the
   later self sufficient;
3. moving make_absolute_path into a new separate file.

The following numbers have been received with the default optimization
settings on master using GCC 4.1.2:

Before:
   text    data     bss     dec     hex filename
 143915    1348   93168  238431   3a35f git-shell

After:
   text    data     bss     dec     hex filename
  17670     788    8232   26690    6842 git-shell

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'dp/clean-fix'</title>
<updated>2008-03-09T05:29:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-03-09T05:29:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=175f5595511b047a320e5c6163c642ac1fc34681'/>
<id>urn:sha1:175f5595511b047a320e5c6163c642ac1fc34681</id>
<content type='text'>
* dp/clean-fix:
  git-clean: add tests for relative path
  git-clean: correct printing relative path
  Make private quote_path() in wt-status.c available as quote_path_relative()
  Revert part of d089eba (setup: sanitize absolute and funny paths in get_pathspec())
  Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)
  Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files)
  get_pathspec(): die when an out-of-tree path is given
</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>unquote_c_style: fix off-by-one.</title>
<updated>2008-03-07T21:31:30Z</updated>
<author>
<name>Pierre Habouzit</name>
<email>madcoder@debian.org</email>
</author>
<published>2008-03-06T21:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c8744d6a8b27115503565041566d97c21e722584'/>
<id>urn:sha1:c8744d6a8b27115503565041566d97c21e722584</id>
<content type='text'>
The optional endp parameter to unquote_c_style() was supposed to point at
a location past the closing double quote, but it was going one beyond it.

git-fast-import used this function heavily and the bug caused it to
misparse the input stream, especially when parsing a rename command:

	R "filename that needs quoting" rename-target-name

Because the function erroneously ate the whitespace after the closing dq,
this triggered "Missing space after source" error when it shouldn't.

Thanks to Adeodato Simò for having caught this.

Signed-off-by: Pierre Habouzit &lt;madcoder@debian.org&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>
<entry>
<title>Style: place opening brace of a function definition at column 1</title>
<updated>2007-11-08T23:35:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2007-11-08T23:35:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f3fa1838024dc0f3741d2f9654af92f6a1bb34bd'/>
<id>urn:sha1:f3fa1838024dc0f3741d2f9654af92f6a1bb34bd</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
