Michael Haggerty <mhagger@xxxxxxxxxxxx> writes: > Error out if the ref_transaction includes more than one update for any > refname. > > Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx> > --- > refs.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) This somehow feels like "ehh, I now know better and this function should have been like this from the beginning" to me. But that is OK. Is the initial creation logic too fragile to deserve its own function to force callers to think about it, by the way? What I am wondering is if we could turn the safety logic that appear here (i.e. no existing refs must be assumed by the set of updates, etc.) into an optimization cue and implement this as a special case helper to ref_transaction_commit(), i.e. ref_transaction_commit(...) { if (updates are all initial creation && no existing refs in repository) return initial_ref_transaction_commit(...); /* otherwise we do the usual thing */ ... } and have "clone" call ref_transaction_commit() as usual. -- To unsubscribe from this list: send the line "unsubscribe git" in