<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.h, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-04-08T04:51:59Z</updated>
<entry>
<title>remote: New function remote_is_configured()</title>
<updated>2009-04-08T04:51:59Z</updated>
<author>
<name>Finn Arne Gangstad</name>
<email>finnag@pvv.org</email>
</author>
<published>2009-04-06T13:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a23ba3375e2afa8045a433a3debce99c373beb2'/>
<id>urn:sha1:9a23ba3375e2afa8045a433a3debce99c373beb2</id>
<content type='text'>
Previously, there was no easy way to check for the existence of a
configured remote. remote_get for example would always create the remote
"on demand".

This new function returns 1 if the remote is configured, 0 otherwise.

Signed-off-by: Finn Arne Gangstad &lt;finnag@pvv.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote: let guess_remote_head() optionally return all matches</title>
<updated>2009-02-27T23:08:17Z</updated>
<author>
<name>Jay Soffian</name>
<email>jaysoffian@gmail.com</email>
</author>
<published>2009-02-27T19:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4229f1fa325870d6b24fe2a4c7d2ed5f14c6f771'/>
<id>urn:sha1:4229f1fa325870d6b24fe2a4c7d2ed5f14c6f771</id>
<content type='text'>
Determining HEAD is ambiguous since it is done by comparing SHA1s.

In the case of multiple matches we return refs/heads/master if it
matches, else we return the first match we encounter. builtin-remote
needs all matches returned to it, so add a flag for it to request such.

To be simple and consistent, the return value is now a copy (including
peer_ref) of the matching refs.

Originally contributed by Jeff King along with the prior commit as a
single patch.

Signed-off-by: Jay Soffian &lt;jaysoffian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote: simplify guess_remote_head()</title>
<updated>2009-02-26T08:49:45Z</updated>
<author>
<name>Jay Soffian</name>
<email>jaysoffian@gmail.com</email>
</author>
<published>2009-02-25T08:32:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6cb4e6cc0f5b2de1998492b0178eeb0f99d4a800'/>
<id>urn:sha1:6cb4e6cc0f5b2de1998492b0178eeb0f99d4a800</id>
<content type='text'>
This function had complications which made it hard to extend.

- It used to do two things: find the HEAD ref, and then find a
  matching ref, optionally returning the former via assignment to a
  passed-in pointer. Since finding HEAD is a one-liner, just have a
  caller do it themselves and pass it as an argument.

- It used to manually search through the ref list for
  refs/heads/master; this can be a one-line call to
  find_ref_by_name.

Originally contributed by Jeff King along with the next commit as a
single patch.

Signed-off-by: Jay Soffian &lt;jaysoffian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>move locate_head() to remote.c</title>
<updated>2009-02-26T08:49:45Z</updated>
<author>
<name>Jay Soffian</name>
<email>jaysoffian@gmail.com</email>
</author>
<published>2009-02-25T08:32:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ef517337dc684a333111b46d88c3217202f48c3'/>
<id>urn:sha1:8ef517337dc684a333111b46d88c3217202f48c3</id>
<content type='text'>
Move locate_head() to remote.c and rename it to guess_remote_head() to
more accurately reflect what it does. This is in preparation for being
able to call it from builtin-remote.c

Signed-off-by: Jay Soffian &lt;jaysoffian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>move duplicated ref_newer() to remote.c</title>
<updated>2009-02-26T08:49:45Z</updated>
<author>
<name>Jay Soffian</name>
<email>jaysoffian@gmail.com</email>
</author>
<published>2009-02-25T08:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec8452d5a797fca865666f761b785b04212426fc'/>
<id>urn:sha1:ec8452d5a797fca865666f761b785b04212426fc</id>
<content type='text'>
ref_newer() appears to have been copied from builtin-send-pack.c to
http-push.c via cut and paste. This patch moves the function and its
helper unmark_and_free() to remote.c. There was a slight difference
between the two implementations, one used TMP_MARK for the mark, the
other used 1. Per Jeff King, I went with TMP_MARK as more correct.

This is in preparation for being able to call it from builtin-remote.c

Signed-off-by: Jay Soffian &lt;jaysoffian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>move duplicated get_local_heads() to remote.c</title>
<updated>2009-02-26T08:49:45Z</updated>
<author>
<name>Jay Soffian</name>
<email>jaysoffian@gmail.com</email>
</author>
<published>2009-02-25T08:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=454e2025a933593fd751475b59cc014887b4df6d'/>
<id>urn:sha1:454e2025a933593fd751475b59cc014887b4df6d</id>
<content type='text'>
get_local_heads() appears to have been copied from builtin-send-pack.c
to http-push.c via cut and paste. This patch moves the function and its
helper one_local_ref() to remote.c.

The two copies of one_local_ref() were not identical. I used the more
recent version from builtin-send-pack.c after confirming with Jeff King
that it was an oversight that commit 30affa1e did not update both
copies.

This is in preparation for being able to call it from builtin-remote.c

Signed-off-by: Jay Soffian &lt;jaysoffian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote: add a new 'origin' variable to the struct</title>
<updated>2008-11-11T22:19:29Z</updated>
<author>
<name>Miklos Vajna</name>
<email>vmiklos@frugalware.org</email>
</author>
<published>2008-11-10T20:43:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89cf4c7004ec329c3171448a154d050c8f75874e'/>
<id>urn:sha1:89cf4c7004ec329c3171448a154d050c8f75874e</id>
<content type='text'>
This allows one to track where was the remote's original source, so that
it's possible to decide if it makes sense to migrate it to the config
format or not.

Signed-off-by: Miklos Vajna &lt;vmiklos@frugalware.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>make alloc_ref_from_str() the new alloc_ref()</title>
<updated>2008-10-18T13:53:47Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2008-10-18T08:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59c69c0c656ebce2f7ce870b4913512597a98390'/>
<id>urn:sha1:59c69c0c656ebce2f7ce870b4913512597a98390</id>
<content type='text'>
With all calls to alloc_ref() gone, we can remove it and then we're free
to give alloc_ref_from_str() the shorter name.  It's a much nicer
interface, as the callers always need to have a name string when they
allocate a ref anyway and don't need to calculate and pass its length+1
any more.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote.c: make free_ref(), parse_push_refspec() and free_refspecs() static.</title>
<updated>2008-09-25T15:00:28Z</updated>
<author>
<name>Nanako Shiraishi</name>
<email>nanako3@lavabit.com</email>
</author>
<published>2008-09-25T09:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=697d7f5dad805fd6d9d57e07d5019f97fa9a0d4b'/>
<id>urn:sha1:697d7f5dad805fd6d9d57e07d5019f97fa9a0d4b</id>
<content type='text'>
These functions are not used by any other file.

Signed-off-by: Nanako Shiraishi &lt;nanako3@lavabit.com&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>remote.c: add a function for deleting a refspec array and use it (twice)</title>
<updated>2008-08-22T07:15:37Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-08-22T00:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2cb1f36d5098060a4bac182da16ceed3197a57c2'/>
<id>urn:sha1:2cb1f36d5098060a4bac182da16ceed3197a57c2</id>
<content type='text'>
A number of call sites allocate memory for a refspec array, populate
its members with heap memory, and then free only the refspec pointer
while leaking the memory allocated for the member elements. Provide
a function for freeing the elements of a refspec array and the array
itself.

Caution to callers: code paths must be checked to ensure that the
refspec members "src" and "dst" can be passed to free.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
