| 1210 | } |
| 1211 | |
| 1212 | struct ref_transaction *ref_store_transaction_begin(struct ref_store *refs, |
| 1213 | unsigned int flags, |
| 1214 | struct strbuf *err) |
| 1215 | { |
| 1216 | struct ref_transaction *tr; |
| 1217 | assert(err); |
| 1218 | |
| 1219 | CALLOC_ARRAY(tr, 1); |
| 1220 | tr->ref_store = refs; |
| 1221 | tr->flags = flags; |
| 1222 | string_list_init_dup(&tr->refnames); |
| 1223 | |
| 1224 | if (flags & REF_TRANSACTION_ALLOW_FAILURE) |
| 1225 | CALLOC_ARRAY(tr->rejections, 1); |
| 1226 | |
| 1227 | return tr; |
| 1228 | } |
| 1229 | |
| 1230 | void ref_transaction_free(struct ref_transaction *transaction) |
| 1231 | { |
no test coverage detected