<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.c, branch v2.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.8.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.8.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-03-07T01:18:40Z</updated>
<entry>
<title>remote: don't resolve HEAD in non-repository</title>
<updated>2016-03-07T01:18:40Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-03-05T22:11:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2f12d169aa607604edbd942675026174f061e3f'/>
<id>urn:sha1:f2f12d169aa607604edbd942675026174f061e3f</id>
<content type='text'>
The remote-config code wants to look at HEAD to mark the
current branch specially. But if we are not in a repository
(e.g., running "git archive --remote"), this makes no sense;
there is no HEAD to look at, and we have no current branch.

This doesn't really cause any bugs in practice (if you are
not in a repo, you probably don't have a .git/HEAD file),
but we should be more careful about triggering the refs code
at all in a non-repo. As we grow new ref backends, we would
not even know which backend to use.

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>Merge branch 'jk/tighten-alloc'</title>
<updated>2016-02-26T21:37:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-26T21:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11529ecec914d2f0d7575e6d443c2d5a6ff75424'/>
<id>urn:sha1:11529ecec914d2f0d7575e6d443c2d5a6ff75424</id>
<content type='text'>
Update various codepaths to avoid manually-counted malloc().

* jk/tighten-alloc: (22 commits)
  ewah: convert to REALLOC_ARRAY, etc
  convert ewah/bitmap code to use xmalloc
  diff_populate_gitlink: use a strbuf
  transport_anonymize_url: use xstrfmt
  git-compat-util: drop mempcpy compat code
  sequencer: simplify memory allocation of get_message
  test-path-utils: fix normalize_path_copy output buffer size
  fetch-pack: simplify add_sought_entry
  fast-import: simplify allocation in start_packfile
  write_untracked_extension: use FLEX_ALLOC helper
  prepare_{git,shell}_cmd: use argv_array
  use st_add and st_mult for allocation size computation
  convert trivial cases to FLEX_ARRAY macros
  use xmallocz to avoid size arithmetic
  convert trivial cases to ALLOC_ARRAY
  convert manual allocations to argv_array
  argv-array: add detach function
  add helpers for allocating flex-array structs
  harden REALLOC_ARRAY and xcalloc against size_t overflow
  tree-diff: catch integer overflow in combine_diff_path allocation
  ...
</content>
</entry>
<entry>
<title>Merge branch 'tg/git-remote'</title>
<updated>2016-02-26T21:37:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-26T21:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae2f25542ffdd1919b33c8f274f8172e49d64dbf'/>
<id>urn:sha1:ae2f25542ffdd1919b33c8f274f8172e49d64dbf</id>
<content type='text'>
The internal API to interact with "remote.*" configuration
variables has been streamlined.

* tg/git-remote:
  remote: use remote_is_configured() for add and rename
  remote: actually check if remote exits
  remote: simplify remote_is_configured()
  remote: use parse_config_key
</content>
</entry>
<entry>
<title>use st_add and st_mult for allocation size computation</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50a6c8efa2bbeddf46ca34c7765024108202e04b'/>
<id>urn:sha1:50a6c8efa2bbeddf46ca34c7765024108202e04b</id>
<content type='text'>
If our size computation overflows size_t, we may allocate a
much smaller buffer than we expected and overflow it. It's
probably impossible to trigger an overflow in most of these
sites in practice, but it is easy enough convert their
additions and multiplications into overflow-checking
variants. This may be fixing real bugs, and it makes
auditing the code easier.

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>convert trivial cases to FLEX_ARRAY macros</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96ffc06f72f693d80f05059a1f0e5ca9007d5f1b'/>
<id>urn:sha1:96ffc06f72f693d80f05059a1f0e5ca9007d5f1b</id>
<content type='text'>
Using FLEX_ARRAY macros reduces the amount of manual
computation size we have to do. It also ensures we don't
overflow size_t, and it makes sure we write the same number
of bytes that we allocated.

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: 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>remote: use parse_config_key</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:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc60f8a77c6e676225810f33117abcf9117b1c1e'/>
<id>urn:sha1:bc60f8a77c6e676225810f33117abcf9117b1c1e</id>
<content type='text'>
95b567c7 ("use skip_prefix to avoid repeating strings") transformed
calls using starts_with() and then skipping the length of the prefix to
skip_prefix() calls.  In remote.c there are a few calls like:

  if (starts_with(foo, "bar"))
      foo += 3

These calls weren't touched by the aformentioned commit, but can be
replaced by calls to parse_config_key(), to simplify the code and
clarify the intentions.  Do that.

Helped-by: Jeff King &lt;peff@peff.net&gt;
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>Merge branch 'aw/push-force-with-lease-reporting'</title>
<updated>2016-02-10T22:20:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-10T22:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=24abb31727e8e0b216bdee182dbbbbc43d134fa6'/>
<id>urn:sha1:24abb31727e8e0b216bdee182dbbbbc43d134fa6</id>
<content type='text'>
"git push --force-with-lease" has been taught to report if the push
needed to force (or fast-forwarded).

* aw/push-force-with-lease-reporting:
  push: fix ref status reporting for --force-with-lease
</content>
</entry>
<entry>
<title>Merge branch 'kf/http-proxy-auth-methods'</title>
<updated>2016-02-03T22:16:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-02-03T22:16:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30f302f7e7f407c0444b32e264aaa72c4081011e'/>
<id>urn:sha1:30f302f7e7f407c0444b32e264aaa72c4081011e</id>
<content type='text'>
New http.proxyAuthMethod configuration variable can be used to
specify what authentication method to use, as a way to work around
proxies that do not give error response expected by libcurl when
CURLAUTH_ANY is used.  Also, the codepath for proxy authentication
has been taught to use credential API to store the authentication
material in user's keyrings.

* kf/http-proxy-auth-methods:
  http: use credential API to handle proxy authentication
  http: allow selection of proxy authentication method
</content>
</entry>
<entry>
<title>push: fix ref status reporting for --force-with-lease</title>
<updated>2016-02-01T23:03:50Z</updated>
<author>
<name>Andrew Wheeler</name>
<email>awheeler@motorola.com</email>
</author>
<published>2016-01-29T23:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2e93f88cb94f487650beb93ff87ceb7ab68a0ed'/>
<id>urn:sha1:b2e93f88cb94f487650beb93ff87ceb7ab68a0ed</id>
<content type='text'>
The --force--with-lease push option leads to less
detailed status information than --force. In particular,
the output indicates that a reference was fast-forwarded,
even when it was force-updated.

Modify the --force-with-lease ref status logic to leverage
the --force ref status logic when the "lease" conditions
are met.

Also, enhance tests to validate output status reporting.

Signed-off-by: Andrew Wheeler &lt;awheeler@motorola.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
