<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.h, branch v2.10.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.10.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.10.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-09-09T04:35:53Z</updated>
<entry>
<title>Merge branch 'jk/push-force-with-lease-creation' into maint</title>
<updated>2016-09-09T04:35:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-09T04:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f34d900aa7346592a9d7fd2eb7b21126fd9732d5'/>
<id>urn:sha1:f34d900aa7346592a9d7fd2eb7b21126fd9732d5</id>
<content type='text'>
"git push --force-with-lease" already had enough logic to allow
ensuring that such a push results in creation of a ref (i.e. the
receiving end did not have another push from sideways that would be
discarded by our force-pushing), but didn't expose this possibility
to the users.  It does so now.

* jk/push-force-with-lease-creation:
  t5533: make it pass on case-sensitive filesystems
  push: allow pushing new branches with --force-with-lease
  push: add shorthand for --force-with-lease branch creation
  Documentation/git-push: fix placeholder formatting
</content>
</entry>
<entry>
<title>push: allow pushing new branches with --force-with-lease</title>
<updated>2016-07-26T20:48:28Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2016-07-26T20:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64ac39af7020f3a8bc52d51137804ce9f46baf66'/>
<id>urn:sha1:64ac39af7020f3a8bc52d51137804ce9f46baf66</id>
<content type='text'>
If there is no upstream information for a branch, it is likely that it
is newly created and can safely be pushed under the normal fast-forward
rules.  Relax the --force-with-lease check so that we do not reject
these branches immediately but rather attempt to push them as new
branches, using the null SHA-1 as the expected value.

In fact, it is already possible to push new branches using the explicit
--force-with-lease=&lt;branch&gt;:&lt;expect&gt; syntax, so all we do here is make
this behaviour the default if no explicit "expect" value is specified.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote: simplify remote_is_configured()</title>
<updated>2016-02-16T21:33:12Z</updated>
<author>
<name>Thomas Gummerer</name>
<email>t.gummerer@gmail.com</email>
</author>
<published>2016-02-16T09:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=674468b3642abfff7c61d5ff95fffc43b87f70b7'/>
<id>urn:sha1:674468b3642abfff7c61d5ff95fffc43b87f70b7</id>
<content type='text'>
The remote_is_configured() function allows checking whether a remote
exists or not.  The function however only works if remote_get() wasn't
called before calling it.  In addition, it only checks the configuration
for remotes, but not remotes or branches files.

Make use of the origin member of struct remote instead, which indicates
where the remote comes from.  It will be set to some value if the remote
is configured in any file in the repository, but is initialized to 0 if
the remote is only created in make_remote().

Signed-off-by: Thomas Gummerer &lt;t.gummerer@gmail.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: allow selection of proxy authentication method</title>
<updated>2016-01-26T18:53:09Z</updated>
<author>
<name>Knut Franke</name>
<email>k.franke@science-computing.de</email>
</author>
<published>2016-01-26T13:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef976395e26a25fb6d048d859a1c8cddb2640b9a'/>
<id>urn:sha1:ef976395e26a25fb6d048d859a1c8cddb2640b9a</id>
<content type='text'>
CURLAUTH_ANY does not work with proxies which answer unauthenticated requests
with a 307 redirect to an error page instead of a 407 listing supported
authentication methods. Therefore, allow the authentication method to be set
using the environment variable GIT_HTTP_PROXY_AUTHMETHOD or configuration
variables http.proxyAuthmethod and remote.&lt;name&gt;.proxyAuthmethod (in analogy
to http.proxy and remote.&lt;name&gt;.proxy).

The following values are supported:

* anyauth (default)
* basic
* digest
* negotiate
* ntlm

Signed-off-by: Knut Franke &lt;k.franke@science-computing.de&gt;
Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Helped-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref_newer: convert to use struct object_id</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f3d57b6e43d6c6f13c94371f16b79fcdece25bc'/>
<id>urn:sha1:6f3d57b6e43d6c6f13c94371f16b79fcdece25bc</id>
<content type='text'>
Convert ref_newer and its caller to use struct object_id instead of
unsigned char *.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Convert struct ref to use object_id.</title>
<updated>2015-11-20T13:02:05Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2015-11-10T02:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4e54d02b894064d370e461385b48701485672bd'/>
<id>urn:sha1:f4e54d02b894064d370e461385b48701485672bd</id>
<content type='text'>
Use struct object_id in three fields in struct ref and convert all the
necessary places that use it.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>remote.c: add branch_get_push</title>
<updated>2015-05-22T16:33:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-21T04:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e291c75a95d60862cbe12897b5cffb01ba4cedd5'/>
<id>urn:sha1:e291c75a95d60862cbe12897b5cffb01ba4cedd5</id>
<content type='text'>
In a triangular workflow, the place you pull from and the
place you push to may be different. As we have
branch_get_upstream for the former, this patch adds
branch_get_push for the latter (and as the former implements
@{upstream}, so will this implement @{push} in a future
patch).

Note that the memory-handling for the return value bears
some explanation. Some code paths require allocating a new
string, and some let us return an existing string. We should
provide a consistent interface to the caller, so it knows
whether to free the result or not.

We could do so by xstrdup-ing any existing strings, and
having the caller always free. But that makes us
inconsistent with branch_get_upstream, so we would prefer to
simply take ownership of the resulting string. We do so by
storing it inside the "struct branch", just as we do with
the upstream refname (in that case we compute it when the
branch is created, but there's no reason not to just fill
it in lazily in this case).

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>remote.c: return upstream name from stat_tracking_info</title>
<updated>2015-05-22T16:32:34Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-22T00:49:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=979cb245e29b35812d2d71a04069ba7a4580981f'/>
<id>urn:sha1:979cb245e29b35812d2d71a04069ba7a4580981f</id>
<content type='text'>
After calling stat_tracking_info, callers often want to
print the name of the upstream branch (in addition to the
tracking count). To do this, they have to access
branch-&gt;merge-&gt;dst[0] themselves. This is not wrong, as the
return value from stat_tracking_info tells us whether we
have an upstream branch or not. But it is a bit leaky, as we
make an assumption about how it calculated the upstream
name.

Instead, let's add an out-parameter that lets the caller
know the upstream name we found.

As a bonus, we can get rid of the unusual tri-state return
from the function. We no longer need to use it to
differentiate between "no tracking config" and "tracking ref
does not exist" (since you can check the upstream_name for
that), so we can just use the usual 0/-1 convention for
success/error.

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>remote.c: report specific errors from branch_get_upstream</title>
<updated>2015-05-21T18:07:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-21T04:45:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a429d0af342d85ef6d561e3a60ae8793a34ae78'/>
<id>urn:sha1:3a429d0af342d85ef6d561e3a60ae8793a34ae78</id>
<content type='text'>
When the previous commit introduced the branch_get_upstream
helper, there was one call-site that could not be converted:
the one in sha1_name.c, which gives detailed error messages
for each possible failure.

Let's teach the helper to optionally report these specific
errors. This lets us convert another callsite, and means we
can use the helper in other locations that want to give the
same error messages.

The logic and error messages come straight from sha1_name.c,
with the exception that we start each error with a lowercase
letter, as is our usual style (note that a few tests need
updated as a result).

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>remote.c: introduce branch_get_upstream helper</title>
<updated>2015-05-21T18:04:42Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-21T04:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9f9f8cc1f59104257eb1a11a2d048f54dd92ee6'/>
<id>urn:sha1:a9f9f8cc1f59104257eb1a11a2d048f54dd92ee6</id>
<content type='text'>
All of the information needed to find the @{upstream} of a
branch is included in the branch struct, but callers have to
navigate a series of possible-NULL values to get there.
Let's wrap that logic up in an easy-to-read helper.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
