]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
initial_ref_transaction_commit(): check for ref D/F conflicts
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 22 Jun 2015 14:03:04 +0000 (16:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jun 2015 20:17:12 +0000 (13:17 -0700)
commite426ff4222ba82a57ed459320509273dc8959ade
tree6beec8b70933e9068471a1c284b883e834acd885
parentfb802b312961f49d0aa35f50e72a9a2d17fde9aa
initial_ref_transaction_commit(): check for ref D/F conflicts

In initial_ref_transaction_commit(), check for D/F conflicts (i.e.,
the type of conflict that exists between "refs/foo" and
"refs/foo/bar") among the references being created and between the
references being created and any hypothetical existing references.

Ideally, there shouldn't *be* any existing references when this
function is called. But, at least in the case of the "testgit" remote
helper, "clone" can be called after the remote-tracking "HEAD" and
"master" branches have already been created. So let's just do the
full-blown check.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c