From: Ronnie Sahlberg Date: Mon, 19 May 2014 23:11:37 GMT Subject: Re: [PATCH 03/31] refs.c: rename the transaction functions Message-ID: In-Reply-To: On Fri, May 16, 2014 at 2:15 PM, Junio C Hamano wrote: > Ronnie Sahlberg writes: > >> Rename the transaction functions. Remove the leading ref_ from the names >> and append _sha1 to the names for functions that create/delete/update sha1 >> refs. >> ... >> - transaction = ref_transaction_begin(); >> + transaction = transaction_begin(); > > Why? Do we forsee that there will never be other kinds of > transaction, and whenever we say a "transaction" that will be always > about updating the refs and nothing else? ref_transaction_... is a bit of a mouthful. I think initially we will only need a transaction framework for normal sha1 refs, for symrefs and for reflog updates and these should all be handled by the same transaction system so a single _begin/_update*/_commit should be able to atomically commit changes that involve updates to all three types. I am not sure if we need transactions for other types of data, such as sha1 objects, but if it turns out we do in the future we can rename these functions again.