diff options
| author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2023-03-28 15:58:46 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-03-28 07:36:36 -0700 |
| commit | d850b7a545fcfbd97460a921c7f7c59d933eb0f7 (patch) | |
| tree | e36940d63b92557a8d930301ff96e70e55cc222d /t/helper/test-fast-rebase.c | |
| parent | 7258e892d2c0f7a615562656e9978f39f610c056 (diff) | |
| download | git-d850b7a545fcfbd97460a921c7f7c59d933eb0f7.tar.gz | |
cocci: apply the "cache.h" part of "the_repository.pending"
Apply the part of "the_repository.pending.cocci" pertaining to
"cache.h".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-fast-rebase.c')
| -rw-r--r-- | t/helper/test-fast-rebase.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c index efc82dd80c..5d1284328d 100644 --- a/t/helper/test-fast-rebase.c +++ b/t/helper/test-fast-rebase.c @@ -25,7 +25,8 @@ static const char *short_commit_name(struct commit *commit) { - return find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV); + return repo_find_unique_abbrev(the_repository, &commit->object.oid, + DEFAULT_ABBREV); } static struct commit *peel_committish(const char *name) @@ -33,10 +34,11 @@ static struct commit *peel_committish(const char *name) struct object *obj; struct object_id oid; - if (get_oid(name, &oid)) + if (repo_get_oid(the_repository, name, &oid)) return NULL; obj = parse_object(the_repository, &oid); - return (struct commit *)peel_to_type(name, 0, obj, OBJ_COMMIT); + return (struct commit *)repo_peel_to_type(the_repository, name, 0, obj, + OBJ_COMMIT); } static char *get_author(const char *message) @@ -119,7 +121,7 @@ int cmd__fast_rebase(int argc, const char **argv) strbuf_addf(&branch_name, "refs/heads/%s", argv[4]); /* Sanity check */ - if (get_oid("HEAD", &head)) + if (repo_get_oid(the_repository, "HEAD", &head)) die(_("Cannot read HEAD")); assert(oideq(&onto->object.oid, &head)); |
