Files
git/builtin
Michael Haggerty 58f233ce1e initial_ref_transaction_commit(): function for initial ref creation
"git clone" uses shortcuts when creating the initial set of
references:

* It writes them directly to packed-refs.

* It doesn't lock the individual references (though it does lock the
  packed-refs file).

* It doesn't check for refname conflicts between two new references or
  between one new reference and any hypothetical old ones.

* It doesn't create reflog entries for the reference creations.

This functionality was implemented in builtin/clone.c. But really that
file shouldn't have such intimate knowledge of how references are
stored. So provide a new function in the refs API,
initial_ref_transaction_commit(), which can be used for initial
reference creation. The new function is based on the ref_transaction
interface.

This means that we can make some other functions private to the refs
module. That will be done in a followup commit.

It would seem to make sense to add a test here that there are no
existing references, because that is how the function *should* be
used. But in fact, the "testgit" remote helper appears to call it
*after* having set up refs/remotes/<name>/HEAD and
refs/remotes/<name>/master, so we can't be so strict. For now, the
function trusts its caller to only call it when it makes sense. Future
commits will add some more limited sanity checks.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22 13:17:11 -07:00
..
2015-05-22 12:41:55 -07:00
2014-07-16 11:10:11 -07:00
2015-05-05 21:00:23 -07:00
2015-06-01 12:45:15 -07:00
2015-06-05 12:17:37 -07:00
2015-06-01 12:45:15 -07:00
2015-01-14 09:32:04 -08:00
2015-05-26 13:24:46 -07:00
2015-05-11 14:39:28 -07:00
2015-06-22 13:17:10 -07:00
2015-06-05 12:17:37 -07:00
2015-05-25 12:19:32 -07:00
2015-05-11 14:23:39 -07:00
2015-05-11 14:23:59 -07:00
2015-03-20 13:11:53 -07:00
2015-06-05 12:17:36 -07:00
2015-06-05 12:17:36 -07:00
2015-01-14 09:32:04 -08:00
2015-01-14 09:32:04 -08:00
2015-05-11 14:23:39 -07:00
2015-06-22 13:17:10 -07:00
2015-05-11 14:23:39 -07:00
2015-01-14 09:32:04 -08:00
2015-01-14 09:32:04 -08:00