<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, 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-10-28T16:01:23Z</updated>
<entry>
<title>Merge branch 'rs/cocci' into maint</title>
<updated>2016-10-28T16:01:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8fd2201756f9cd10a796311a1b25d7a2ab2a3b9'/>
<id>urn:sha1:c8fd2201756f9cd10a796311a1b25d7a2ab2a3b9</id>
<content type='text'>
Code cleanup.

* rs/cocci:
  use strbuf_add_unique_abbrev() for adding short hashes, part 3
  remove unnecessary NULL check before free(3)
  coccicheck: make transformation for strbuf_addf(sb, "...") more precise
  use strbuf_add_unique_abbrev() for adding short hashes, part 2
  use strbuf_addstr() instead of strbuf_addf() with "%s", part 2
  gitignore: ignore output files of coccicheck make target
  use strbuf_addstr() for adding constant strings to a strbuf, part 2
  add coccicheck make target
  contrib/coccinelle: fix semantic patch for oid_to_hex_r()
</content>
</entry>
<entry>
<title>Merge branch 'js/reset-usage' into maint</title>
<updated>2016-10-28T16:01:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a82d8fd0b778664c5178b27b17a5dbbac5e9d21'/>
<id>urn:sha1:9a82d8fd0b778664c5178b27b17a5dbbac5e9d21</id>
<content type='text'>
Message fix-up.

* js/reset-usage:
  reset: fix usage
</content>
</entry>
<entry>
<title>Merge branch 'jk/fetch-quick-tag-following' into maint</title>
<updated>2016-10-28T16:01:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39000e849970a554a257577dcb2fb844a523a1d1'/>
<id>urn:sha1:39000e849970a554a257577dcb2fb844a523a1d1</id>
<content type='text'>
When fetching from a remote that has many tags that are irrelevant
to branches we are following, we used to waste way too many cycles
when checking if the object pointed at by a tag (that we are not
going to fetch!) exists in our repository too carefully.

* jk/fetch-quick-tag-following:
  fetch: use "quick" has_sha1_file for tag following
</content>
</entry>
<entry>
<title>Merge branch 'jk/merge-base-fork-point-without-reflog' into maint</title>
<updated>2016-10-28T16:01:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96ec83ce5207be0aac3c1df1ac92356f9de9ad81'/>
<id>urn:sha1:96ec83ce5207be0aac3c1df1ac92356f9de9ad81</id>
<content type='text'>
"git rebase" immediately after "git clone" failed to find the fork
point from the upstream.

* jk/merge-base-fork-point-without-reflog:
  merge-base: handle --fork-point without reflog
</content>
</entry>
<entry>
<title>Merge branch 'jk/clone-copy-alternates-fix' into maint</title>
<updated>2016-10-28T16:01:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-28T16:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=839b993f1f2a36e9e7511e4c279e4218c2127ed3'/>
<id>urn:sha1:839b993f1f2a36e9e7511e4c279e4218c2127ed3</id>
<content type='text'>
"git clone" of a local repository can be done at the filesystem
level, but the codepath did not check errors while copying and
adjusting the file that lists alternate object stores.

* jk/clone-copy-alternates-fix:
  clone: detect errors in normalize_path_copy
</content>
</entry>
<entry>
<title>fetch: use "quick" has_sha1_file for tag following</title>
<updated>2016-10-14T18:31:32Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-13T16:53:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5827a03545663f6d6b491a35edb313900608568b'/>
<id>urn:sha1:5827a03545663f6d6b491a35edb313900608568b</id>
<content type='text'>
When we auto-follow tags in a fetch, we look at all of the
tags advertised by the remote and fetch ones where we don't
already have the tag, but we do have the object it peels to.
This involves a lot of calls to has_sha1_file(), some of
which we can reasonably expect to fail. Since 45e8a74
(has_sha1_file: re-check pack directory before giving up,
2013-08-30), this may cause many calls to
reprepare_packed_git(), which is potentially expensive.

This has gone unnoticed for several years because it
requires a fairly unique setup to matter:

  1. You need to have a lot of packs on the client side to
     make reprepare_packed_git() expensive (the most
     expensive part is finding duplicates in an unsorted
     list, which is currently quadratic).

  2. You need a large number of tag refs on the server side
     that are candidates for auto-following (i.e., that the
     client doesn't have). Each one triggers a re-read of
     the pack directory.

  3. Under normal circumstances, the client would
     auto-follow those tags and after one large fetch, (2)
     would no longer be true. But if those tags point to
     history which is disconnected from what the client
     otherwise fetches, then it will never auto-follow, and
     those candidates will impact it on every fetch.

So when all three are true, each fetch pays an extra
O(nr_tags * nr_packs^2) cost, mostly in string comparisons
on the pack names. This was exacerbated by 47bf4b0
(prepare_packed_git_one: refactor duplicate-pack check,
2014-06-30) which uses a slightly more expensive string
check, under the assumption that the duplicate check doesn't
happen very often (and it shouldn't; the real problem here
is how often we are calling reprepare_packed_git()).

This patch teaches fetch to use HAS_SHA1_QUICK to sacrifice
accuracy for speed, in cases where we might be racy with a
simultaneous repack. This is similar to the fix in 0eeb077
(index-pack: avoid excessive re-reading of pack directory,
2015-06-09). As with that case, it's OK for has_sha1_file()
occasionally say "no I don't have it" when we do, because
the worst case is not a corruption, but simply that we may
fail to auto-follow a tag that points to it.

Here are results from the included perf script, which sets
up a situation similar to the one described above:

Test            HEAD^               HEAD
----------------------------------------------------------
5550.4: fetch   11.21(10.42+0.78)   0.08(0.04+0.02) -99.3%

Reported-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
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-base: handle --fork-point without reflog</title>
<updated>2016-10-12T21:30:16Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-10-12T20:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4f21454b55f4237b7d0487ad5099c9edf4fc3967'/>
<id>urn:sha1:4f21454b55f4237b7d0487ad5099c9edf4fc3967</id>
<content type='text'>
The --fork-point option looks in the reflog to try to find
where a derived branch forked from a base branch. However,
if the reflog for the base branch is totally empty (as it
commonly is right after cloning, which does not write a
reflog entry), then our for_each_reflog call will not find
any entries, and we will come up with no merge base, even
though there may be one with the current tip of the base.

We can fix this by just adding the current tip to
our list of collected entries.

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 'jc/worktree-config' into maint</title>
<updated>2016-10-11T21:21:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-11T21:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fdb70b16a006f82b65fb92995886a074c829f587'/>
<id>urn:sha1:fdb70b16a006f82b65fb92995886a074c829f587</id>
<content type='text'>
"git worktree", even though it used the default_abbrev setting that
ought to be affected by core.abbrev configuration variable, ignored
the variable setting.  The command has been taught to read the
default set of configuration variables to correct this.

* jc/worktree-config:
  worktree: honor configuration variables
</content>
</entry>
<entry>
<title>Merge branch 'jc/blame-abbrev' into maint</title>
<updated>2016-10-11T21:19:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-11T21:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9534df98683e4268628619fb86af29e11e6db353'/>
<id>urn:sha1:9534df98683e4268628619fb86af29e11e6db353</id>
<content type='text'>
Almost everybody uses DEFAULT_ABBREV to refer to the default
setting for the abbreviation, but "git blame" peeked into
underlying variable bypassing the macro for no good reason.

* jc/blame-abbrev:
  blame: use DEFAULT_ABBREV macro
</content>
</entry>
<entry>
<title>Merge branch 'rs/copy-array' into maint</title>
<updated>2016-10-11T21:18:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-11T21:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a813b19190a75e44b6ebd1ea5317ef5ed914cde0'/>
<id>urn:sha1:a813b19190a75e44b6ebd1ea5317ef5ed914cde0</id>
<content type='text'>
Code cleanup.

* rs/copy-array:
  use COPY_ARRAY
  add COPY_ARRAY
</content>
</entry>
</feed>
