Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Jeff King
On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote: { - struct ref_update *update; - - assert(err); - - if (transaction-state != REF_TRANSACTION_OPEN) - die(BUG: create called for transaction that is not open); - - if (!new_sha1 ||

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Jonathan Nieder
Jeff King wrote: On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote: -if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { -strbuf_addf(err, refusing to create ref with bad name %s, -refname); -return -1; -} You

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-20 Thread Jeff King
On Thu, Nov 20, 2014 at 10:03:15AM -0800, Jonathan Nieder wrote: Jeff King wrote: On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote: - if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { - strbuf_addf(err, refusing to create ref with bad name %s, -

[PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-19 Thread Stefan Beller
From: Ronnie Sahlberg sahlb...@google.com The ref_transaction_update function can already be used to create refs by passing null_sha1 as the old_sha1 parameter. Simplify by replacing transaction_create with a thin wrapper. Signed-off-by: Ronnie Sahlberg sahlb...@google.com Signed-off-by:

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-19 Thread Jonathan Nieder
Stefan Beller wrote: From: Ronnie Sahlberg sahlb...@google.com The ref_transaction_update function can already be used to create refs by passing null_sha1 as the old_sha1 parameter. Simplify by replacing transaction_create with a thin wrapper. Signed-off-by: Ronnie Sahlberg

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-19 Thread Stefan Beller
I am sorry for not having asked before. As I picked up the patches, you had sign offs pretty much at any patch. I'll remove them from future patches when sending to the list. On Wed, Nov 19, 2014 at 5:10 PM, Jonathan Nieder jrnie...@gmail.com wrote: Stefan Beller wrote: From: Ronnie Sahlberg

Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-11-19 Thread Jonathan Nieder
(administrivia: please don't top-post) Stefan Beller wrote: On Wed, Nov 19, 2014 at 5:10 PM, Jonathan Nieder jrnie...@gmail.com wrote: I feel a bit ashamed to have my sign-off peppering all these patches that I didn't have anything to do with except preparing to send them to the list once or