]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/refs-without-the-repository'
authorJunio C Hamano <gitster@pobox.com>
Thu, 16 May 2024 17:10:13 +0000 (10:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 May 2024 17:10:14 +0000 (10:10 -0700)
The refs API lost functions that implicitly assumes to work on the
primary ref_store by forcing the callers to pass a ref_store as an
argument.

* ps/refs-without-the-repository:
  refs: remove functions without ref store
  cocci: apply rules to rewrite callers of "refs" interfaces
  cocci: introduce rules to transform "refs" to pass ref store
  refs: add `exclude_patterns` parameter to `for_each_fullref_in()`
  refs: introduce missing functions that accept a `struct ref_store`

16 files changed:
1  2 
builtin/am.c
builtin/checkout.c
builtin/clone.c
builtin/describe.c
builtin/merge.c
builtin/pull.c
builtin/rebase.c
builtin/reset.c
builtin/rev-parse.c
builtin/stash.c
builtin/submodule--helper.c
builtin/tag.c
builtin/update-index.c
config.c
setup.c
submodule.c

diff --cc builtin/am.c
Simple merge
Simple merge
diff --cc builtin/clone.c
Simple merge
Simple merge
diff --cc builtin/merge.c
Simple merge
diff --cc builtin/pull.c
Simple merge
Simple merge
diff --cc builtin/reset.c
Simple merge
Simple merge
diff --cc builtin/stash.c
Simple merge
Simple merge
diff --cc builtin/tag.c
index 01b19a5b6c9d6585e69cffdfc8870433f2e36e27,424a03ad18c7c5b6fb2a1a3c1e3dc34c427adb73..b18eec91ab50a515976c6b86f83638242f94d2ca
@@@ -673,10 -654,11 +673,11 @@@ int cmd_tag(int argc, const char **argv
                        opt.sign = 1;
                path = git_pathdup("TAG_EDITMSG");
                create_tag(&object, object_ref, tag, &buf, &opt, &prev, &object,
 -                         path);
 +                         &trailer_args, path);
        }
  
-       transaction = ref_transaction_begin(&err);
+       transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
+                                                 &err);
        if (!transaction ||
            ref_transaction_update(transaction, ref.buf, &object, &prev,
                                   create_reflog ? REF_FORCE_CREATE_REFLOG : 0,
Simple merge
diff --cc config.c
Simple merge
diff --cc setup.c
Simple merge
diff --cc submodule.c
Simple merge