reftable/stack: rename reftable_stack_new_addition()

Rename the function `reftable_stack_new_addition()` to
`reftable_stack_addition_new()` to be more inline with our naming
scheme.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Karthik Nayak authored and Junio C Hamano committed 2026-08-24 08:11:18 -07:00
1 parent aae63be1d8
commit cbd35cadfa
4 files changed
+10 -10

No files matched your search

+2 -2
View File
@@ -1002,7 +1002,7 @@ static int prepare_transaction_update(struct write_transaction_table_arg **out,
if (!arg) {
struct reftable_addition *addition;
ret = reftable_stack_new_addition(&addition, be->stack,
ret = reftable_stack_addition_new(&addition, be->stack,
&reftable_be_write_options(refs)->opts);
if (ret) {
if (ret == REFTABLE_LOCK_ERROR)
@@ -2616,7 +2616,7 @@ static int reftable_be_reflog_expire(struct ref_store *ref_store,
if (ret < 0)
goto done;
ret = reftable_stack_new_addition(&add, be->stack,
ret = reftable_stack_addition_new(&add, be->stack,
&reftable_be_write_options(refs)->opts);
if (ret < 0)
goto done;
+1 -1
View File
@@ -62,7 +62,7 @@ struct reftable_addition;
* returns a new transaction to add reftables to the given stack. As a side
* effect, the ref database is locked.
*/
int reftable_stack_new_addition(struct reftable_addition **dest,
int reftable_stack_addition_new(struct reftable_addition **dest,
struct reftable_stack *st,
const struct reftable_write_options *opts);
+2 -2
View File
@@ -828,7 +828,7 @@ done:
return err;
}
int reftable_stack_new_addition(struct reftable_addition **dest,
int reftable_stack_addition_new(struct reftable_addition **dest,
struct reftable_stack *st,
const struct reftable_write_options *opts)
{
@@ -1826,7 +1826,7 @@ static int reftable_stack_clean_locked(struct reftable_stack *st)
int reftable_stack_clean(struct reftable_stack *st)
{
struct reftable_addition *add = NULL;
int err = reftable_stack_new_addition(&add, st, NULL);
int err = reftable_stack_addition_new(&add, st, NULL);
if (err < 0) {
goto done;
}
+5 -5
View File
@@ -257,7 +257,7 @@ void test_reftable_stack__transaction_api(void)
reftable_addition_destroy(add);
cl_assert_equal_i(reftable_stack_new_addition(&add, st, NULL), 0);
cl_assert_equal_i(reftable_stack_addition_new(&add, st, NULL), 0);
cl_assert_equal_i(reftable_addition_add(add, write_test_ref,
&ref), 0);
cl_assert_equal_i(reftable_addition_commit(add), 0);
@@ -298,7 +298,7 @@ void test_reftable_stack__transaction_with_reload(void)
cl_assert_equal_i(reftable_new_stack(&st1, dir, NULL), 0);
cl_assert_equal_i(reftable_new_stack(&st2, dir, NULL), 0);
cl_assert_equal_i(reftable_stack_new_addition(&add, st1, NULL), 0);
cl_assert_equal_i(reftable_stack_addition_new(&add, st1, NULL), 0);
cl_assert_equal_i(reftable_addition_add(add, write_test_ref,
&refs[0]), 0);
cl_assert_equal_i(reftable_addition_commit(add), 0);
@@ -308,7 +308,7 @@ void test_reftable_stack__transaction_with_reload(void)
* The second stack is now outdated, but it should automatically reload it
* with the newer updates.
*/
cl_assert_equal_i(reftable_stack_new_addition(&add, st2, NULL), 0);
cl_assert_equal_i(reftable_stack_addition_new(&add, st2, NULL), 0);
cl_assert_equal_i(reftable_addition_add(add, write_test_ref,
&refs[1]), 0);
cl_assert_equal_i(reftable_addition_commit(add), 0);
@@ -355,7 +355,7 @@ void test_reftable_stack__transaction_api_performs_auto_compaction(void)
* we can ensure that we indeed honor this setting and have
* better control over when exactly auto compaction runs.
*/
cl_assert_equal_i(reftable_stack_new_addition(&add,
cl_assert_equal_i(reftable_stack_addition_new(&add,
st, &write_opts), 0);
cl_assert_equal_i(reftable_addition_add(add,
write_test_ref, &ref), 0);
@@ -1296,7 +1296,7 @@ void test_reftable_stack__invalid_limit_updates(void)
reftable_addition_destroy(add);
cl_assert_equal_i(reftable_stack_new_addition(&add, st, &opts), 0);
cl_assert_equal_i(reftable_stack_addition_new(&add, st, &opts), 0);
/*
* write_limits_after_ref also updates the update indexes after adding