<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs.h, 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-07-21T18:18:57Z</updated>
<entry>
<title>Merge branch 'rs/unify-is-branch'</title>
<updated>2014-07-21T18:18:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-21T18:18:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=528396a463e4030e19f150e8fddd8d911063e77e'/>
<id>urn:sha1:528396a463e4030e19f150e8fddd8d911063e77e</id>
<content type='text'>
* rs/unify-is-branch:
  refs.c: add a public is_branch function
</content>
</entry>
<entry>
<title>refs.c: add a public is_branch function</title>
<updated>2014-07-16T20:06:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-07-15T23:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7e0f26eb64de205acaac63da89f47aab78ba229'/>
<id>urn:sha1:e7e0f26eb64de205acaac63da89f47aab78ba229</id>
<content type='text'>
Both refs.c and fsck.c have their own private copies of the is_branch function.
Delete the is_branch function from fsck.c and make the version in refs.c
public.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs.c: change ref_transaction_update() to do error checking and return status</title>
<updated>2014-07-14T18:54:42Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:43:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e34800e5bce1dc6f1ab5520a4c866a2a73639de'/>
<id>urn:sha1:8e34800e5bce1dc6f1ab5520a4c866a2a73639de</id>
<content type='text'>
Update ref_transaction_update() do some basic error checking and return
non-zero on error. Update all callers to check ref_transaction_update() for
error. There are currently no conditions in _update that will return error but
there will be in the future. Add an err argument that will be updated on
failure. In future patches we will start doing both locking and checking
for name conflicts in _update instead of _commit at which time this function
will start returning errors for these conditions.

Also check for BUGs during update and die(BUG:...) if we are calling
_update with have_old but the old_sha1 pointer is NULL.

Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>refs.c: remove the onerr argument to ref_transaction_commit</title>
<updated>2014-07-14T18:54:42Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=01319837c53050109c60e6740dfa9462327161f0'/>
<id>urn:sha1:01319837c53050109c60e6740dfa9462327161f0</id>
<content type='text'>
Since all callers now use QUIET_ON_ERR we no longer need to provide an onerr
argument any more. Remove the onerr argument from the ref_transaction_commit
signature.

Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>refs.c: commit_packed_refs to return a meaningful errno on failure</title>
<updated>2014-07-14T18:54:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3f665550588d19d6d6c9f9064aa3d4685afdf4d'/>
<id>urn:sha1:d3f665550588d19d6d6c9f9064aa3d4685afdf4d</id>
<content type='text'>
Making errno when returning from commit_packed_refs() meaningful,
which should fix

 * a bug in "git clone" where it prints strerror(errno) based on
   errno, despite errno possibly being zero and potentially having
   been clobbered by that point
 * the same kind of bug in "git pack-refs"

and prepares for repack_without_refs() to get a meaningful
error message when commit_packed_refs() fails without falling into
the same bug.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>refs.c: verify_lock should set errno to something meaningful</title>
<updated>2014-07-14T18:54:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=835e3c992fd453d172466be29283b55a792cac76'/>
<id>urn:sha1:835e3c992fd453d172466be29283b55a792cac76</id>
<content type='text'>
Making errno when returning from verify_lock() meaningful, which
should almost but not completely fix

 * a bug in "git fetch"'s s_update_ref, which trusts the result of an
   errno == ENOTDIR check to detect D/F conflicts

ENOTDIR makes sense as a sign that a file was in the way of a
directory we wanted to create.  Should "git fetch" also look for
ENOTEMPTY or EEXIST to catch cases where a directory was in the way
of a file to be created?

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>refs.c: make sure log_ref_setup returns a meaningful errno</title>
<updated>2014-07-14T18:54:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd3b02daec241651231f63b3fd8ee2a8ea1dac68'/>
<id>urn:sha1:bd3b02daec241651231f63b3fd8ee2a8ea1dac68</id>
<content type='text'>
Making errno when returning from log_ref_setup() meaningful,

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>refs.c: add an err argument to repack_without_refs</title>
<updated>2014-07-14T18:54:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=60bca085c893f1866829b55bfee63888943cfe14'/>
<id>urn:sha1:60bca085c893f1866829b55bfee63888943cfe14</id>
<content type='text'>
Update repack_without_refs to take an err argument and update it if there
is a failure. Pass the err variable from ref_transaction_commit to this
function so that callers can print a meaningful error message if _commit
fails due to this function.

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>lockfile.c: make lock_file return a meaningful errno on failurei</title>
<updated>2014-07-14T18:54:41Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a'/>
<id>urn:sha1:447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a</id>
<content type='text'>
Making errno when returning from lock_file() meaningful, which should
fix

 * an existing almost-bug in lock_ref_sha1_basic where it assumes
   errno==ENOENT is meaningful and could waste some work on retries

 * an existing bug in repack_without_refs where it prints
   strerror(errno) and picks advice based on errno, despite errno
   potentially being zero and potentially having been clobbered by
   that point

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
<entry>
<title>refs.c: add a strbuf argument to ref_transaction_commit for error logging</title>
<updated>2014-07-14T18:54:40Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2014-06-20T14:42:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=995f8746bc421a537e12622770a90be2205cd26f'/>
<id>urn:sha1:995f8746bc421a537e12622770a90be2205cd26f</id>
<content type='text'>
Add a strbuf argument to _commit so that we can pass an error string back to
the caller. So that we can do error logging from the caller instead of from
_commit.

Longer term plan is to first convert all callers to use onerr==QUIET_ON_ERR
and craft any log messages from the callers themselves and finally remove the
onerr argument completely.

Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Acked-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
</content>
</entry>
</feed>
