<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/connect.c, branch v1.4.4.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.4.4.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.4.4.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2006-09-13T05:30:32Z</updated>
<entry>
<title>connect.c: finish_connect(): allow null pid parameter</title>
<updated>2006-09-13T05:30:32Z</updated>
<author>
<name>Franck Bui-Huu</name>
<email>vagabon.xyz@gmail.com</email>
</author>
<published>2006-09-12T09:00:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f42a5c4eb0453cd33276e078cd7541b1ef25b2c4'/>
<id>urn:sha1:f42a5c4eb0453cd33276e078cd7541b1ef25b2c4</id>
<content type='text'>
git_connect() can return 0 if we use git protocol for example.
Users of this function don't know and don't care if a process
had been created or not, and to avoid them to check it before
calling finish_connect() this patch allows finish_connect() to
take a null pid. And in that case return 0.

[jc: updated function signature of git_connect() with a comment on
 its return value. ]

Signed-off-by: Franck Bui-Huu &lt;vagabon.xyz@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Fix a memory leak in "connect.c" and die if command too long.</title>
<updated>2006-09-11T05:48:11Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2006-09-11T05:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0f503d77ac9032fbfbd5f3bacafeccbcf408b31f'/>
<id>urn:sha1:0f503d77ac9032fbfbd5f3bacafeccbcf408b31f</id>
<content type='text'>
Use "add_to_string" instead of "sq_quote" and "snprintf", so
that there is no memory allocation and no memory leak.
Also check if the command is too long to fit into the buffer
and die if this is the case, instead of truncating it to the
buffer size.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>send-pack: remove remote reference limit</title>
<updated>2006-09-06T00:40:46Z</updated>
<author>
<name>Andy Whitcroft</name>
<email>apw@shadowen.org</email>
</author>
<published>2006-09-05T19:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c41e20b30b2bd4b8167917336676cde6f6aadd06'/>
<id>urn:sha1:c41e20b30b2bd4b8167917336676cde6f6aadd06</id>
<content type='text'>
When build a pack for a push we query the remote copy for existant
heads.  These are used to prune unnecessary objects from the pack.
As we receive the remote references in get_remote_heads() we validate
the reference names via check_ref() which includes a length check;
rejecting those &gt;45 characters in size.

This is a miss converted change, it was originally designed to reject
messages which were less than 45 characters in length (a 40 character
sha1 and refs/) to prevent comparing unitialised memory.  check_ref()
now gets the raw length so check for at least 5 characters.

Signed-off-by: Andy Whitcroft &lt;apw@shadowen.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Replace uses of strdup with xstrdup.</title>
<updated>2006-09-02T10:24:37Z</updated>
<author>
<name>Shawn Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2006-09-02T04:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9befac470b4cfad529032dbcffcb71242ec71f91'/>
<id>urn:sha1:9befac470b4cfad529032dbcffcb71242ec71f91</id>
<content type='text'>
Like xmalloc and xrealloc xstrdup dies with a useful message if
the native strdup() implementation returns NULL rather than a
valid pointer.

I just tried to use xstrdup in new code and found it to be missing.
However I expected it to be present as xmalloc and xrealloc are
already commonly used throughout the code.

[jc: removed the part that deals with last_XXX, which I am
 finding more and more dubious these days.]

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Convert memcpy(a,b,20) to hashcpy(a,b).</title>
<updated>2006-08-23T20:53:10Z</updated>
<author>
<name>Shawn Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2006-08-23T06:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e702496e434a160f798447b95b9cea3cd138c140'/>
<id>urn:sha1:e702496e434a160f798447b95b9cea3cd138c140</id>
<content type='text'>
This abstracts away the size of the hash values when copying them
from memory location to memory location, much as the introduction
of hashcmp abstracted away hash value comparsion.

A few call sites were using char* rather than unsigned char* so
I added the cast rather than open hashcpy to be void*.  This is a
reasonable tradeoff as most call sites already use unsigned char*
and the existing hashcmp is also declared to be unsigned char*.

[jc: Splitted the patch to "master" part, to be followed by a
 patch for merge-recursive.c which is not in "master" yet.

 Fixed the cast in the latter hunk to combine-diff.c which was
 wrong in the original.

 Also converted ones left-over in combine-diff.c, diff-lib.c and
 upload-pack.c ]

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>remove unnecessary initializations</title>
<updated>2006-08-16T04:22:20Z</updated>
<author>
<name>David Rientjes</name>
<email>rientjes@google.com</email>
</author>
<published>2006-08-15T17:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=96f1e58f524fac8607cfc38896b365b6e8365b51'/>
<id>urn:sha1:96f1e58f524fac8607cfc38896b365b6e8365b51</id>
<content type='text'>
[jc: I needed to hand merge the changes to the updated codebase,
 so the result needs to be checked.]

Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>finish_connect(): thinkofix</title>
<updated>2006-08-16T04:02:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-08-15T23:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=53e1a761be8d338cd957870bc1e48a8c15d7d2c0'/>
<id>urn:sha1:53e1a761be8d338cd957870bc1e48a8c15d7d2c0</id>
<content type='text'>
All but one callers have ignore the return value from this
function, but the only caller, builtin-tar-tree.c::remote_tar(),
assumed it returns non-zero on failure and zero on success.  The
implementation however was returning either the waited pid
(which must be the same as its input) or -1 (an error).

Fix this thinko, while getting rid of an assignment of return
value from waitpid() into a variable of type int.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Improve git-peek-remote</title>
<updated>2006-07-04T21:50:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@osdl.org</email>
</author>
<published>2006-07-04T19:29:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2718ff098a1cd1bf48fc230164259b56e3e7178f'/>
<id>urn:sha1:2718ff098a1cd1bf48fc230164259b56e3e7178f</id>
<content type='text'>
This makes git-peek-remote able to basically do everything that
git-ls-remote does (but obviously just for the native protocol, so no
http[s]: or rsync: support).

The default behaviour is the same, but you can now give a mixture of
"--refs", "--tags" and "--heads" flags, where "--refs" forces
git-peek-remote to only show real refs (ie none of the fakey tag lookups,
but also not the special pseudo-refs like HEAD and MERGE_HEAD).

The "--tags" and "--heads" flags respectively limit the output to just
regular tags and heads, of course.

You can still also ask to limit them by name too.

You can combine the flags, so

	git peek-remote --refs --tags .

will show all local _true_ tags, without the generated tag lookups
(compare the output without the "--refs" flag).

And "--tags --heads" will show both tags and heads, but will avoid (for
example) any special refs outside of the standard locations.

I'm also planning on adding a "--ignore-local" flag that allows us to ask
it to ignore any refs that we already have in the local tree, but that's
an independent thing.

All this is obviously gearing up to making "git fetch" cheaper.

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Fix errno usage in connect.c</title>
<updated>2006-07-02T00:09:26Z</updated>
<author>
<name>Petr Baudis</name>
<email>pasky@suse.cz</email>
</author>
<published>2006-07-01T21:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ac3bc6c1d1f549f6809d8a7d29bcaed302f3c193'/>
<id>urn:sha1:ac3bc6c1d1f549f6809d8a7d29bcaed302f3c193</id>
<content type='text'>
errno was used after it could've been modified by a subsequent library call.
Spotted by Morten Welinder.

Signed-off-by: Petr Baudis &lt;pasky@suse.cz&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>connect.c: remove unused parameters from tcp_connect and proxy_connect</title>
<updated>2006-06-28T10:50:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-06-28T10:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c78963d280adc11646b95156e3d9271d0404ce7f'/>
<id>urn:sha1:c78963d280adc11646b95156e3d9271d0404ce7f</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
