<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin, branch v2.1.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-09-30T05:10:55Z</updated>
<entry>
<title>Merge branch 'jk/fsck-exit-code-fix' into maint</title>
<updated>2014-09-30T05:10:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-30T05:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46c8f859b7eebe962d99c8547b0c908bbf8ecf0f'/>
<id>urn:sha1:46c8f859b7eebe962d99c8547b0c908bbf8ecf0f</id>
<content type='text'>
"git fsck" failed to report that it found corrupt objects via its
exit status in some cases.

* jk/fsck-exit-code-fix:
  fsck: return non-zero status on missing ref tips
  fsck: exit with non-zero status upon error from fsck_obj()
</content>
</entry>
<entry>
<title>Merge branch 'ta/config-add-to-empty-or-true-fix' into maint</title>
<updated>2014-09-30T05:10:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-30T05:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=102edda4dfa3f2119119c2b52c90a9337a03178f'/>
<id>urn:sha1:102edda4dfa3f2119119c2b52c90a9337a03178f</id>
<content type='text'>
"git config --add section.var val" used to lose existing
section.var whose value was an empty string.

* ta/config-add-to-empty-or-true-fix:
  config: avoid a funny sentinel value "a^"
  make config --add behave correctly for empty and NULL values
</content>
</entry>
<entry>
<title>Merge branch 'jk/index-pack-threading-races' into maint</title>
<updated>2014-09-30T05:09:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-30T05:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46092ebf224d45464ef5663544b19b38b95a51c9'/>
<id>urn:sha1:46092ebf224d45464ef5663544b19b38b95a51c9</id>
<content type='text'>
When receiving an invalid pack stream that records the same object
twice, multiple threads got confused due to a race.

* jk/index-pack-threading-races:
  index-pack: fix race condition with duplicate bases
</content>
</entry>
<entry>
<title>Merge branch 'jk/send-pack-many-refspecs' into maint</title>
<updated>2014-09-30T05:08:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-30T05:08:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=060517093ecfdf39e89edc79678ce1ba9ff52ec5'/>
<id>urn:sha1:060517093ecfdf39e89edc79678ce1ba9ff52ec5</id>
<content type='text'>
"git push" over HTTP transport had an artificial limit on number of
refs that can be pushed imposed by the command line length.

* jk/send-pack-many-refspecs:
  send-pack: take refspecs over stdin
</content>
</entry>
<entry>
<title>Merge branch 'nd/fetch-pass-quiet-to-gc-child-process' into maint</title>
<updated>2014-09-19T21:05:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-19T21:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=08fd8a055cd11291020bf8c6f83d27cdc55df419'/>
<id>urn:sha1:08fd8a055cd11291020bf8c6f83d27cdc55df419</id>
<content type='text'>
* nd/fetch-pass-quiet-to-gc-child-process:
  fetch: silence git-gc if --quiet is given
  fetch: convert argv_gc_auto to struct argv_array
</content>
</entry>
<entry>
<title>Merge branch 'jc/apply-ws-prefix' into maint</title>
<updated>2014-09-19T21:05:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-19T21:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb6ac5ea13250b295b4620face2ea5c0c9809b0b'/>
<id>urn:sha1:bb6ac5ea13250b295b4620face2ea5c0c9809b0b</id>
<content type='text'>
* jc/apply-ws-prefix:
  apply: omit ws check for excluded paths
  apply: hoist use_patch() helper for path exclusion up
  apply: use the right attribute for paths in non-Git patches

Conflicts:
	builtin/apply.c
</content>
</entry>
<entry>
<title>fsck: return non-zero status on missing ref tips</title>
<updated>2014-09-12T17:45:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-09-12T03:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30d1038d1bd538bf2f8abfb5f5dccf80327a26c9'/>
<id>urn:sha1:30d1038d1bd538bf2f8abfb5f5dccf80327a26c9</id>
<content type='text'>
Fsck tries hard to detect missing objects, and will complain
(and exit non-zero) about any inter-object links that are
missing. However, it will not exit non-zero for any missing
ref tips, meaning that a severely broken repository may
still pass "git fsck &amp;&amp; echo ok".

The problem is that we use for_each_ref to iterate over the
ref tips, which hides broken tips. It does at least print an
error from the refs.c code, but fsck does not ever see the
ref and cannot note the problem in its exit code. We can solve
this by using for_each_rawref and noting the error ourselves.

In addition to adding tests for this case, we add tests for
all types of missing-object links (all of which worked, but
which we were not testing).

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>config: avoid a funny sentinel value "a^"</title>
<updated>2014-09-11T23:33:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-08-19T06:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c1063be2a3e14ac042db4fe9b9bcea8f2768886a'/>
<id>urn:sha1:c1063be2a3e14ac042db4fe9b9bcea8f2768886a</id>
<content type='text'>
Introduce CONFIG_REGEX_NONE as a more explicit sentinel value to say
"we do not want to replace any existing entry" and use it in the
implementation of "git config --add".

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>fsck: exit with non-zero status upon error from fsck_obj()</title>
<updated>2014-09-10T16:40:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-08-29T20:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e770fe47ef9c0b20bc687e37f3eb50f1bf919d0'/>
<id>urn:sha1:2e770fe47ef9c0b20bc687e37f3eb50f1bf919d0</id>
<content type='text'>
Upon finding a corrupt loose object, we forgot to note the error to
signal it with the exit status of the entire process.

[jc: adjusted t1450 and added another test]

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>index-pack: fix race condition with duplicate bases</title>
<updated>2014-08-29T21:50:43Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-08-29T20:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab791dd1383536405b8c68ffcf84246b3b0a9812'/>
<id>urn:sha1:ab791dd1383536405b8c68ffcf84246b3b0a9812</id>
<content type='text'>
When we are resolving deltas in an indexed pack, we do it by
first selecting a potential base (either one stored in full
in the pack, or one created by resolving another delta), and
then resolving any deltas that use that base.  When we
resolve a particular delta, we flip its "real_type" field
from OBJ_{REF,OFS}_DELTA to whatever the real type is.

We assume that traversing the objects this way will visit
each delta only once. This is correct for most packs; we
visit the delta only when we process its base, and each
object (and thus each base) appears only once. However, if a
base object appears multiple times in the pack, we will try
to resolve any deltas based on it once for each instance.

We can detect this case by noting that a delta we are about
to resolve has already had its real_type field flipped, and
we already do so with an assert().  However, if multiple
threads are in use, we may race with another thread on
comparing and flipping the field. We need to synchronize the
access.

The right mechanism for doing this is a compare-and-swap (we
atomically "claim" the delta for our own and find out
whether our claim was successful). We can implement this
in C by using a pthread mutex to protect the operation. This
is not the fastest way of doing a compare-and-swap; many
processors provide instructions for this, and gcc and other
compilers provide builtins to access them. However, some
experiments showed that lock contention does not cause a
significant slowdown here. Adding c-a-s support for many
compilers would increase the maintenance burden (and we
would still end up including the pthread version as a
fallback).

Note that we only need to touch the OBJ_REF_DELTA codepath
here. An OBJ_OFS_DELTA object points to its base using an
offset, and therefore has only one base, even if another
copy of that base object appears in the pack (we do still
touch it briefly because the setting of real_type is
factored out of resolve_data).

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