<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.c, branch v2.5.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.5.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.5.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-06-24T19:21:52Z</updated>
<entry>
<title>Merge branch 'mh/reporting-broken-refs-from-for-each-ref'</title>
<updated>2015-06-24T19:21:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-24T19:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d71c5f408dabb94f21891f69de17aa72d4787c3'/>
<id>urn:sha1:9d71c5f408dabb94f21891f69de17aa72d4787c3</id>
<content type='text'>
"git for-each-ref" reported "missing object" for 0{40} when it
encounters a broken ref.  The lack of object whose name is 0{40} is
not the problem; the ref being broken is.

* mh/reporting-broken-refs-from-for-each-ref:
  read_loose_refs(): treat NULL_SHA1 loose references as broken
  read_loose_refs(): simplify function logic
  for-each-ref: report broken references correctly
  t6301: new tests of for-each-ref error handling
</content>
</entry>
<entry>
<title>Merge branch 'mh/verify-lock-error-report'</title>
<updated>2015-06-11T16:29:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-11T16:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=829f03e98c63a69b0f3b6e40e012da8a0fe25e2a'/>
<id>urn:sha1:829f03e98c63a69b0f3b6e40e012da8a0fe25e2a</id>
<content type='text'>
Bring consistency to error reporting mechanism used in "refs" API.

* mh/verify-lock-error-report:
  ref_transaction_commit(): do not capitalize error messages
  verify_lock(): do not capitalize error messages
  verify_lock(): report errors via a strbuf
  verify_lock(): on errors, let the caller unlock the lock
  verify_lock(): return 0/-1 rather than struct ref_lock *
</content>
</entry>
<entry>
<title>read_loose_refs(): treat NULL_SHA1 loose references as broken</title>
<updated>2015-06-08T17:35:41Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-06-03T13:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=501cf47cddfbf8040b6f9b8ac06d13094a70f729'/>
<id>urn:sha1:501cf47cddfbf8040b6f9b8ac06d13094a70f729</id>
<content type='text'>
NULL_SHA1 is used to indicate an "invalid object name" throughout our
code (and the code of other git implementations), so it is vastly more
likely that an on-disk reference was set to this value due to a
software bug than that NULL_SHA1 is the legitimate SHA-1 of an actual
object.  Therefore, if a loose reference has the value NULL_SHA1,
consider it to be broken.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>read_loose_refs(): simplify function logic</title>
<updated>2015-06-03T18:44:25Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-06-03T13:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f5517074f8f5cecc773b2ff927be4a059f2c9db0'/>
<id>urn:sha1:f5517074f8f5cecc773b2ff927be4a059f2c9db0</id>
<content type='text'>
Make it clearer that there are two possible ways to read the
reference, but that we handle read errors uniformly regardless of
which way it was read.

This refactoring also makes the following change easier to implement.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ref_transaction_commit(): do not capitalize error messages</title>
<updated>2015-05-27T22:58:42Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-22T23:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2e0a718c66760efebf7b348aef48dc1f885bc2a'/>
<id>urn:sha1:c2e0a718c66760efebf7b348aef48dc1f885bc2a</id>
<content type='text'>
Our convention is for error messages to start with a lower-case
letter.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>verify_lock(): do not capitalize error messages</title>
<updated>2015-05-27T22:58:42Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-22T23:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=000f0da57aca00d6ff960f0763dee73c34cd7677'/>
<id>urn:sha1:000f0da57aca00d6ff960f0763dee73c34cd7677</id>
<content type='text'>
Our convention is for error messages to start with a lower-case
letter.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>verify_lock(): report errors via a strbuf</title>
<updated>2015-05-27T22:57:47Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-22T23:34:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33ffc176d65e1e98e1eea262dc7827830c33c56d'/>
<id>urn:sha1:33ffc176d65e1e98e1eea262dc7827830c33c56d</id>
<content type='text'>
Instead of writing error messages directly to stderr, write them to
a "strbuf *err".  The caller, lock_ref_sha1_basic(), uses this error
reporting convention with all the other callees, and reports its
error this way to its callers.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>verify_lock(): on errors, let the caller unlock the lock</title>
<updated>2015-05-27T19:40:29Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-22T23:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f41d6329704a8c3f7286f52c3589d381ac0bc79d'/>
<id>urn:sha1:f41d6329704a8c3f7286f52c3589d381ac0bc79d</id>
<content type='text'>
The caller already knows how to do it, so always do it in the same
place.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>verify_lock(): return 0/-1 rather than struct ref_lock *</title>
<updated>2015-05-27T19:39:41Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-22T23:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a5e2499e5421c88ec2403087597613d60b8f3077'/>
<id>urn:sha1:a5e2499e5421c88ec2403087597613d60b8f3077</id>
<content type='text'>
Its return value wasn't conveying any extra information, but it made
the reader wonder whether the ref_lock that it returned might be
different than the one that was passed to it. So change the function
to the traditional "return 0 on success or a negative value on error".

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>struct ref_lock: convert old_sha1 member to object_id</title>
<updated>2015-05-25T19:19:40Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2015-05-25T18:39:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cb901a4b0e19c87a1415f0f74995e54690598af'/>
<id>urn:sha1:5cb901a4b0e19c87a1415f0f74995e54690598af</id>
<content type='text'>
Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
