<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/fetch.c, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-05T20:45:39Z</updated>
<entry>
<title>Merge branch 'mh/refs-have-new'</title>
<updated>2015-03-05T20:45:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-03-05T20:45:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd9de868c359a1bbd214e354aefdb0f1eaa898bd'/>
<id>urn:sha1:fd9de868c359a1bbd214e354aefdb0f1eaa898bd</id>
<content type='text'>
Simplify the ref transaction API around how "the ref should be
pointing at this object" is specified.

* mh/refs-have-new:
  refs.h: remove duplication in function docstrings
  update_ref(): improve documentation
  ref_transaction_verify(): new function to check a reference's value
  ref_transaction_delete(): check that old_sha1 is not null_sha1
  ref_transaction_create(): check that new_sha1 is valid
  commit: avoid race when creating orphan commits
  commit: add tests of commit races
  ref_transaction_delete(): remove "have_old" parameter
  ref_transaction_update(): remove "have_old" parameter
  struct ref_update: move "have_old" into "flags"
  refs.c: change some "flags" to "unsigned int"
  refs: remove the gap in the REF_* constant values
  refs: move REF_DELETING to refs.c
</content>
</entry>
<entry>
<title>ref_transaction_update(): remove "have_old" parameter</title>
<updated>2015-02-17T19:22:50Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-02-17T17:00:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d147bdff0b8132d3aa53a46df8dbab7b673b796'/>
<id>urn:sha1:1d147bdff0b8132d3aa53a46df8dbab7b673b796</id>
<content type='text'>
Instead, verify the reference's old value if and only if old_sha1 is
non-NULL.

ref_transaction_delete() will get the same treatment in a moment.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>do not include the same header twice</title>
<updated>2015-02-13T21:16:12Z</updated>
<author>
<name>Дилян Палаузов</name>
<email>git-dpa@aegee.org</email>
</author>
<published>2015-02-13T14:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d308512ffde7efa6b5aad9549320b394b79b740'/>
<id>urn:sha1:5d308512ffde7efa6b5aad9549320b394b79b740</id>
<content type='text'>
A few files include the same header file directly more than once.

As all these headers protect themselves against repeated inclusion
by the "#ifndef FOO_H / #define FOO_H / ... / #endif" idiom, leave
only the first inclusion and remove the later inclusion as a no-op
clean-up.

Signed-off-by: Дилян Палаузов &lt;git-dpa@aegee.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
