summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2014-12-01 23:46:40 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-03 09:53:51 -0800
commit4e0032e992da5eafd2bdedc94d3754e9e3d2fb38 (patch)
tree57ae2ea50bd1f4d86657e22bb3cac7d3300ad6d0
parent7c7fcc0454b2769d524f6be116e80338f2b01837 (diff)
downloadgit-sb/ref-transaction-reflog.tar.gz
refs.c: rename transaction.updates to transaction.ref_updatessb/ref-transaction-reflog
The updates are only holding refs not reflogs, so express it to the reader. Signed-off-by: Stefan Beller <sbeller@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--refs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/refs.c b/refs.c
index 2044d8ff10..fbab62ffc7 100644
--- a/refs.c
+++ b/refs.c
@@ -3542,7 +3542,7 @@ enum transaction_state {
* as atomically as possible. This structure is opaque to callers.
*/
struct transaction {
- struct ref_update **updates;
+ struct ref_update **ref_updates;
size_t alloc;
size_t nr;
enum transaction_state state;
@@ -3563,10 +3563,10 @@ void transaction_free(struct transaction *transaction)
return;
for (i = 0; i < transaction->nr; i++) {
- free(transaction->updates[i]->msg);
- free(transaction->updates[i]);
+ free(transaction->ref_updates[i]->msg);
+ free(transaction->ref_updates[i]);
}
- free(transaction->updates);
+ free(transaction->ref_updates);
free(transaction);
}
@@ -3577,8 +3577,8 @@ static struct ref_update *add_update(struct transaction *transaction,
struct ref_update *update = xcalloc(1, sizeof(*update) + len + 1);
strcpy((char *)update->refname, refname);
- ALLOC_GROW(transaction->updates, transaction->nr + 1, transaction->alloc);
- transaction->updates[transaction->nr++] = update;
+ ALLOC_GROW(transaction->ref_updates, transaction->nr + 1, transaction->alloc);
+ transaction->ref_updates[transaction->nr++] = update;
return update;
}
@@ -3700,7 +3700,7 @@ int transaction_commit(struct transaction *transaction,
int ret = 0, delnum = 0, i;
const char **delnames;
int n = transaction->nr;
- struct ref_update **updates = transaction->updates;
+ struct ref_update **updates = transaction->ref_updates;
assert(err);