<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/fetch.c, branch v2.2.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-11-06T18:52:32Z</updated>
<entry>
<title>Merge branch 'jk/fetch-reflog-df-conflict'</title>
<updated>2014-11-06T18:52:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-11-06T18:52:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1671dd82b5e1c6e837a3f47509a3a33189b0884'/>
<id>urn:sha1:a1671dd82b5e1c6e837a3f47509a3a33189b0884</id>
<content type='text'>
Corner-case bugfixes for "git fetch" around reflog handling.

* jk/fetch-reflog-df-conflict:
  ignore stale directories when checking reflog existence
  fetch: load all default config at startup
</content>
</entry>
<entry>
<title>fetch: load all default config at startup</title>
<updated>2014-11-04T20:13:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-11-04T13:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=72549dfd5d33424fbf557b0078503687780a3a53'/>
<id>urn:sha1:72549dfd5d33424fbf557b0078503687780a3a53</id>
<content type='text'>
When we start the git-fetch program, we call git_config to
load all config, but our callback only processes the
fetch.prune option; we do not chain to git_default_config at
all.

This means that we may not load some core configuration
which will have an effect. For instance, we do not load
core.logAllRefUpdates, which impacts whether or not we
create reflogs in a bare repository.

Note that I said "may" above. It gets even more exciting. If
we have to transfer actual objects as part of the fetch,
then we call fetch_pack as part of the same process. That
function loads its own config, which does chain to
git_default_config, impacting global variables which are
used by the rest of fetch. But if the fetch is a pure ref
update (e.g., a new ref which is a copy of an old one), we
skip fetch_pack entirely. So we get inconsistent results
depending on whether or not we have actual objects to
transfer or not!

Let's just load the core config at the start of fetch, so we
know we have it (we may also load it again as part of
fetch_pack, but that's OK; it's designed to be idempotent).

Our tests check both cases (with and without a pack). We
also check similar behavior for push for good measure, but
it already works as expected.

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>fetch.c: change s_update_ref to use a ref transaction</title>
<updated>2014-10-15T17:47:23Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-04-28T20:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd94f765720e32ea0bf72996c8dc7dd0b1cc30d0'/>
<id>urn:sha1:cd94f765720e32ea0bf72996c8dc7dd0b1cc30d0</id>
<content type='text'>
Change s_update_ref to use a ref transaction for the ref update.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch: silence git-gc if --quiet is given</title>
<updated>2014-08-18T17:14:19Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-08-16T01:19:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6fceed3bea59d747c160972c67663e8b8c281229'/>
<id>urn:sha1:6fceed3bea59d747c160972c67663e8b8c281229</id>
<content type='text'>
Noticed-by: Matthew Flaschen &lt;mflaschen@wikimedia.org&gt;
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>fetch: convert argv_gc_auto to struct argv_array</title>
<updated>2014-08-18T17:14:08Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2014-08-16T01:19:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1991006cb9c84ec11de8a5ebf9e419f0ac1f00d0'/>
<id>urn:sha1:1991006cb9c84ec11de8a5ebf9e419f0ac1f00d0</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/xstrfmt'</title>
<updated>2014-07-09T18:34:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-09T18:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3b8e8af187cb86ed030432f1a067121fdd4b1c3b'/>
<id>urn:sha1:3b8e8af187cb86ed030432f1a067121fdd4b1c3b</id>
<content type='text'>
* jk/xstrfmt:
  setup_git_env(): introduce git_path_from_env() helper
  unique_path: fix unlikely heap overflow
  walker_fetch: fix minor memory leak
  merge: use argv_array when spawning merge strategy
  sequencer: use argv_array_pushf
  setup_git_env: use git_pathdup instead of xmalloc + sprintf
  use xstrfmt to replace xmalloc + strcpy/strcat
  use xstrfmt to replace xmalloc + sprintf
  use xstrdup instead of xmalloc + strcpy
  use xstrfmt in favor of manual size calculations
  strbuf: add xstrfmt helper
</content>
</entry>
<entry>
<title>use xstrfmt to replace xmalloc + strcpy/strcat</title>
<updated>2014-06-19T22:20:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-19T21:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2724c87872aaec55dd7e5529aa029c3108b43a5'/>
<id>urn:sha1:b2724c87872aaec55dd7e5529aa029c3108b43a5</id>
<content type='text'>
It's easy to get manual allocation calculations wrong, and
the use of strcpy/strcat raise red flags for people looking
for buffer overflows (though in this case each site was
fine).

It's also shorter to use xstrfmt, and the printf-format
tends to be easier for a reader to see what the final string
will look like.

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>fetch: allow explicit --refmap to override configuration</title>
<updated>2014-06-05T22:13:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-05-29T22:21:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5558f80c3a34f411022f1bc67f8364556ca3922'/>
<id>urn:sha1:c5558f80c3a34f411022f1bc67f8364556ca3922</id>
<content type='text'>
Since the introduction of opportunisitic updates of remote-tracking
branches, started at around f2690487 (fetch: opportunistically
update tracking refs, 2013-05-11) with a few updates in v1.8.4 era,
the remote.*.fetch configuration always kicks in even when a refspec
to specify what to fetch is given on the command line, and there is
no way to disable or override it per-invocation.

Teach the command to pay attention to the --refmap=&lt;lhs&gt;:&lt;rhs&gt;
command-line options that can be used to override the use of
configured remote.*.fetch as the refmap.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
---
</content>
</entry>
<entry>
<title>Merge branch 'ep/varscope'</title>
<updated>2014-02-27T22:01:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-02-27T22:01:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=043478308feec3cda9b3473bc0b79396cb9d4db6'/>
<id>urn:sha1:043478308feec3cda9b3473bc0b79396cb9d4db6</id>
<content type='text'>
Shrink lifetime of variables by moving their definitions to an
inner scope where appropriate.

* ep/varscope:
  builtin/gc.c: reduce scope of variables
  builtin/fetch.c: reduce scope of variable
  builtin/commit.c: reduce scope of variables
  builtin/clean.c: reduce scope of variable
  builtin/blame.c: reduce scope of variables
  builtin/apply.c: reduce scope of variables
  bisect.c: reduce scope of variable
</content>
</entry>
<entry>
<title>builtin/fetch.c: reduce scope of variable</title>
<updated>2014-01-31T18:44:05Z</updated>
<author>
<name>Elia Pinto</name>
<email>gitter.spiros@gmail.com</email>
</author>
<published>2014-01-29T16:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf7e645c90e08f0d3391502c888453033e446372'/>
<id>urn:sha1:bf7e645c90e08f0d3391502c888453033e446372</id>
<content type='text'>
Signed-off-by: Elia Pinto &lt;gitter.spiros@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
