From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: pclouds@gmail.com
Cc: git@vger.kernel.org, gitster@pobox.com, sbeller@google.com,
Brandon Williams <bmwill@google.com>,
Jonathan Tan <jonathantanmy@google.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH 00/27] sb/object-store updates
Date: Fri, 23 Mar 2018 18:20:54 +0100 [thread overview]
Message-ID: <20180323172121.17725-1-pclouds@gmail.com> (raw)
In-Reply-To: <20180303113637.26518-1-pclouds@gmail.com>
I think I have addressed all comments I've received so far. What I
decided not to do, I have responded individually. One comment I did
not respond nor do is the approximate thing, which could be done
later.
Interdiff is big due to the "objects." to "objects->" conversion
(blame Brandon for his suggestion, don't blame me :D)
diff --git a/builtin/am.c b/builtin/am.c
index 4762a702e3..47beddbe24 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1859,7 +1859,7 @@ static void am_run(struct am_state *state, int resume)
*/
if (!state->rebasing) {
am_destroy(state);
- close_all_packs(&the_repository->objects);
+ close_all_packs(the_repository->objects);
run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
}
}
diff --git a/builtin/clone.c b/builtin/clone.c
index 13cfaa6488..7df5932b85 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -27,6 +27,7 @@
#include "connected.h"
#include "packfile.h"
#include "list-objects-filter-options.h"
+#include "object-store.h"
/*
* Overall FIXMEs:
@@ -1217,7 +1218,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
transport_disconnect(transport);
if (option_dissociate) {
- close_all_packs(&the_repository->objects);
+ close_all_packs(the_repository->objects);
dissociate_from_references();
}
diff --git a/builtin/count-objects.c b/builtin/count-objects.c
index 5c7c3c6ae3..b28ff00be2 100644
--- a/builtin/count-objects.c
+++ b/builtin/count-objects.c
@@ -12,6 +12,7 @@
#include "parse-options.h"
#include "quote.h"
#include "packfile.h"
+#include "object-store.h"
static unsigned long garbage;
static off_t size_garbage;
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 4d72efca78..a39e9d7b15 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1478,7 +1478,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
string_list_clear(&list, 0);
- close_all_packs(&the_repository->objects);
+ close_all_packs(the_repository->objects);
argv_array_pushl(&argv_gc_auto, "gc", "--auto", NULL);
if (verbosity < 0)
diff --git a/builtin/fsck.c b/builtin/fsck.c
index b0abba6e04..3ef25fab97 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -17,6 +17,7 @@
#include "streaming.h"
#include "decorate.h"
#include "packfile.h"
+#include "object-store.h"
#define REACHABLE 0x0001
#define SEEN 0x0002
@@ -714,11 +715,13 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
for_each_loose_object(mark_loose_for_connectivity, NULL, 0);
for_each_packed_object(mark_packed_for_connectivity, NULL, 0);
} else {
+ struct alternate_object_database *alt_odb_list;
+
fsck_object_dir(get_object_directory());
prepare_alt_odb(the_repository);
- for (alt = the_repository->objects.alt_odb_list;
- alt; alt = alt->next)
+ alt_odb_list = the_repository->objects->alt_odb_list;
+ for (alt = alt_odb_list; alt; alt = alt->next)
fsck_object_dir(alt->path);
if (check_full) {
diff --git a/builtin/gc.c b/builtin/gc.c
index dd30067ac1..b00238cd5d 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -21,6 +21,7 @@
#include "argv-array.h"
#include "commit.h"
#include "packfile.h"
+#include "object-store.h"
#define FAILED_RUN "failed to run %s"
diff --git a/builtin/grep.c b/builtin/grep.c
index 0f0c195705..1e9cdbdf78 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -22,6 +22,7 @@
#include "pathspec.h"
#include "submodule.h"
#include "submodule-config.h"
+#include "object-store.h"
static char const * const grep_usage[] = {
N_("git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]"),
@@ -432,7 +433,7 @@ static int grep_submodule(struct grep_opt *opt, struct repository *superproject,
* object.
*/
grep_read_lock();
- add_to_alternates_memory(submodule.objects.objectdir);
+ add_to_alternates_memory(submodule.objects->objectdir);
grep_read_unlock();
if (oid) {
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 5ebd370c56..1d6bc87b76 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -13,6 +13,7 @@
#include "streaming.h"
#include "thread-utils.h"
#include "packfile.h"
+#include "object-store.h"
static const char index_pack_usage[] =
"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";
diff --git a/builtin/merge.c b/builtin/merge.c
index 907ae44ab5..96d56cbdd2 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -411,7 +411,7 @@ static void finish(struct commit *head_commit,
* We ignore errors in 'gc --auto', since the
* user should see them.
*/
- close_all_packs(&the_repository->objects);
+ close_all_packs(the_repository->objects);
run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
}
}
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 0e5fde1d6b..223f2d9fc0 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -29,6 +29,7 @@
#include "argv-array.h"
#include "list.h"
#include "packfile.h"
+#include "object-store.h"
static const char *pack_usage[] = {
N_("git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]"),
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index d6d8a44959..b5b007e706 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -9,6 +9,7 @@
#include "builtin.h"
#include "repository.h"
#include "packfile.h"
+#include "object-store.h"
#define BLKSIZE 512
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index ac478b7b99..1a298a6711 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -2026,7 +2026,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
proc.git_cmd = 1;
proc.argv = argv_gc_auto;
- close_all_packs(&the_repository->objects);
+ close_all_packs(the_repository->objects);
if (!start_command(&proc)) {
if (use_sideband)
copy_to_sideband(proc.err, -1, NULL);
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index b1daca995f..6d8e002be7 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -16,6 +16,7 @@
#include "revision.h"
#include "diffcore.h"
#include "diff.h"
+#include "object-store.h"
#define OPT_QUIET (1 << 0)
#define OPT_CACHED (1 << 1)
diff --git a/environment.c b/environment.c
index c05705e384..93c9fbb0ba 100644
--- a/environment.c
+++ b/environment.c
@@ -271,9 +271,9 @@ const char *get_git_work_tree(void)
char *get_object_directory(void)
{
- if (!the_repository->objects.objectdir)
+ if (!the_repository->objects->objectdir)
BUG("git environment hasn't been setup");
- return the_repository->objects.objectdir;
+ return the_repository->objects->objectdir;
}
int odb_mkstemp(struct strbuf *template, const char *pattern)
diff --git a/fast-import.c b/fast-import.c
index 0dba555478..b3492fce5c 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -169,6 +169,7 @@ Format of STDIN stream:
#include "dir.h"
#include "run-command.h"
#include "packfile.h"
+#include "object-store.h"
#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
diff --git a/http-backend.c b/http-backend.c
index 22921d169a..64dde78c1b 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -11,6 +11,7 @@
#include "url.h"
#include "argv-array.h"
#include "packfile.h"
+#include "object-store.h"
static const char content_type[] = "Content-Type";
static const char content_length[] = "Content-Length";
diff --git a/http-push.c b/http-push.c
index 0913f8ab86..97fe22a705 100644
--- a/http-push.c
+++ b/http-push.c
@@ -12,6 +12,7 @@
#include "sigchain.h"
#include "argv-array.h"
#include "packfile.h"
+#include "object-store.h"
#ifdef EXPAT_NEEDS_XMLPARSE_H
#include <xmlparse.h>
diff --git a/http-walker.c b/http-walker.c
index 2c33969123..75d55d42a9 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -6,6 +6,7 @@
#include "list.h"
#include "transport.h"
#include "packfile.h"
+#include "object-store.h"
struct alt_base {
char *base;
diff --git a/http.c b/http.c
index df9dbea59c..4d613d5f6b 100644
--- a/http.c
+++ b/http.c
@@ -14,6 +14,7 @@
#include "packfile.h"
#include "protocol.h"
#include "string-list.h"
+#include "object-store.h"
static struct trace_key trace_curl = TRACE_KEY_INIT(CURL);
static int trace_curl_data = 1;
diff --git a/object-store.h b/object-store.h
index 521f5a1755..fef33f345f 100644
--- a/object-store.h
+++ b/object-store.h
@@ -90,13 +90,19 @@ struct raw_object_store {
/* Path to extra alternate object database if not NULL */
char *alternate_db;
- struct packed_git *packed_git; /* private */
- /* A most-recently-used ordered version of the packed_git list. */
- struct list_head packed_git_mru; /* private */
-
struct alternate_object_database *alt_odb_list;
struct alternate_object_database **alt_odb_tail;
+ /*
+ * private data
+ *
+ * should only be accessed directly by packfile.c
+ */
+
+ struct packed_git *packed_git;
+ /* A most-recently-used ordered version of the packed_git list. */
+ struct list_head packed_git_mru;
+
/*
* A fast, rough count of the number of objects in the repository.
* These two fields are not meant for direct access. Use
@@ -112,7 +118,7 @@ struct raw_object_store {
unsigned packed_git_initialized : 1;
};
-void raw_object_store_init(struct raw_object_store *o);
+struct raw_object_store *raw_object_store_new(void);
void raw_object_store_clear(struct raw_object_store *o);
/*
diff --git a/object.c b/object.c
index 60ca76b285..4c2cf7ff5d 100644
--- a/object.c
+++ b/object.c
@@ -4,6 +4,7 @@
#include "tree.h"
#include "commit.h"
#include "tag.h"
+#include "object-store.h"
#include "packfile.h"
static struct object **obj_hash;
@@ -447,23 +448,30 @@ void clear_commit_marks_all(unsigned int flags)
}
}
-void raw_object_store_init(struct raw_object_store *o)
+struct raw_object_store *raw_object_store_new(void)
{
+ struct raw_object_store *o = xmalloc(sizeof(*o));
+
memset(o, 0, sizeof(*o));
INIT_LIST_HEAD(&o->packed_git_mru);
+ return o;
}
static void free_alt_odb(struct alternate_object_database *alt)
{
strbuf_release(&alt->scratch);
oid_array_clear(&alt->loose_objects_cache);
+ free(alt);
}
static void free_alt_odbs(struct raw_object_store *o)
{
while (o->alt_odb_list) {
+ struct alternate_object_database *next;
+
+ next = o->alt_odb_list->next;
free_alt_odb(o->alt_odb_list);
- o->alt_odb_list = o->alt_odb_list->next;
+ o->alt_odb_list = next;
}
}
diff --git a/pack-bitmap.c b/pack-bitmap.c
index abed43cdb5..22cd425788 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -11,6 +11,7 @@
#include "pack-objects.h"
#include "packfile.h"
#include "repository.h"
+#include "object-store.h"
/*
* An entry on the bitmap index, representing the bitmap for a given
diff --git a/pack-check.c b/pack-check.c
index 073c1fbd46..2378f25999 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -3,6 +3,7 @@
#include "pack-revindex.h"
#include "progress.h"
#include "packfile.h"
+#include "object-store.h"
struct idx_entry {
off_t offset;
diff --git a/pack-revindex.c b/pack-revindex.c
index ff5f62c033..bb521cf7fb 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "pack-revindex.h"
+#include "object-store.h"
/*
* Pack index for existing packs give us easy access to the offsets into
diff --git a/packfile.c b/packfile.c
index a0842521e5..17170fc662 100644
--- a/packfile.c
+++ b/packfile.c
@@ -14,6 +14,7 @@
#include "tag.h"
#include "tree-walk.h"
#include "tree.h"
+#include "object-store.h"
char *odb_pack_name(struct strbuf *buf,
const unsigned char *sha1,
@@ -244,7 +245,7 @@ static int unuse_one_window(struct packed_git *current)
if (current)
scan_windows(current, &lru_p, &lru_w, &lru_l);
- for (p = the_repository->objects.packed_git; p; p = p->next)
+ for (p = the_repository->objects->packed_git; p; p = p->next)
scan_windows(p, &lru_p, &lru_w, &lru_l);
if (lru_p) {
munmap(lru_w->base, lru_w->len);
@@ -382,7 +383,7 @@ static int close_one_pack(void)
struct pack_window *mru_w = NULL;
int accept_windows_inuse = 1;
- for (p = the_repository->objects.packed_git; p; p = p->next) {
+ for (p = the_repository->objects->packed_git; p; p = p->next) {
if (p->pack_fd == -1)
continue;
find_lru_pack(p, &lru_p, &mru_w, &accept_windows_inuse);
@@ -684,8 +685,8 @@ void install_packed_git(struct packed_git *pack)
if (pack->pack_fd != -1)
pack_open_fds++;
- pack->next = the_repository->objects.packed_git;
- the_repository->objects.packed_git = pack;
+ pack->next = the_repository->objects->packed_git;
+ the_repository->objects->packed_git = pack;
}
void (*report_garbage)(unsigned seen_bits, const char *path);
@@ -767,7 +768,7 @@ static void prepare_packed_git_one(char *objdir, int local)
base_len = path.len;
if (strip_suffix_mem(path.buf, &base_len, ".idx")) {
/* Don't reopen a pack we already have. */
- for (p = the_repository->objects.packed_git; p;
+ for (p = the_repository->objects->packed_git; p;
p = p->next) {
size_t len;
if (strip_suffix(p->pack_name, ".pack", &len) &&
@@ -811,20 +812,20 @@ static void prepare_packed_git_one(char *objdir, int local)
*/
unsigned long approximate_object_count(void)
{
- if (!the_repository->objects.approximate_object_count_valid) {
+ if (!the_repository->objects->approximate_object_count_valid) {
unsigned long count;
struct packed_git *p;
prepare_packed_git();
count = 0;
- for (p = the_repository->objects.packed_git; p; p = p->next) {
+ for (p = the_repository->objects->packed_git; p; p = p->next) {
if (open_pack_index(p))
continue;
count += p->num_objects;
}
- the_repository->objects.approximate_object_count = count;
+ the_repository->objects->approximate_object_count = count;
}
- return the_repository->objects.approximate_object_count;
+ return the_repository->objects->approximate_object_count;
}
static void *get_next_packed_git(const void *p)
@@ -867,8 +868,8 @@ static int sort_pack(const void *a_, const void *b_)
static void rearrange_packed_git(void)
{
- the_repository->objects.packed_git = llist_mergesort(
- the_repository->objects.packed_git, get_next_packed_git,
+ the_repository->objects->packed_git = llist_mergesort(
+ the_repository->objects->packed_git, get_next_packed_git,
set_next_packed_git, sort_pack);
}
@@ -876,42 +877,42 @@ static void prepare_packed_git_mru(void)
{
struct packed_git *p;
- INIT_LIST_HEAD(&the_repository->objects.packed_git_mru);
+ INIT_LIST_HEAD(&the_repository->objects->packed_git_mru);
- for (p = the_repository->objects.packed_git; p; p = p->next)
- list_add_tail(&p->mru, &the_repository->objects.packed_git_mru);
+ for (p = the_repository->objects->packed_git; p; p = p->next)
+ list_add_tail(&p->mru, &the_repository->objects->packed_git_mru);
}
void prepare_packed_git(void)
{
struct alternate_object_database *alt;
- if (the_repository->objects.packed_git_initialized)
+ if (the_repository->objects->packed_git_initialized)
return;
prepare_packed_git_one(get_object_directory(), 1);
prepare_alt_odb(the_repository);
- for (alt = the_repository->objects.alt_odb_list; alt; alt = alt->next)
+ for (alt = the_repository->objects->alt_odb_list; alt; alt = alt->next)
prepare_packed_git_one(alt->path, 0);
rearrange_packed_git();
prepare_packed_git_mru();
- the_repository->objects.packed_git_initialized = 1;
+ the_repository->objects->packed_git_initialized = 1;
}
void reprepare_packed_git(void)
{
- the_repository->objects.approximate_object_count_valid = 0;
- the_repository->objects.packed_git_initialized = 0;
+ the_repository->objects->approximate_object_count_valid = 0;
+ the_repository->objects->packed_git_initialized = 0;
prepare_packed_git();
}
struct packed_git *get_packed_git(struct repository *r)
{
- return r->objects.packed_git;
+ return r->objects->packed_git;
}
struct list_head *get_packed_git_mru(struct repository *r)
{
- return &r->objects.packed_git_mru;
+ return &r->objects->packed_git_mru;
}
unsigned long unpack_object_header_buffer(const unsigned char *buf,
@@ -1022,7 +1023,7 @@ const struct packed_git *has_packed_and_bad(const unsigned char *sha1)
struct packed_git *p;
unsigned i;
- for (p = the_repository->objects.packed_git; p; p = p->next)
+ for (p = the_repository->objects->packed_git; p; p = p->next)
for (i = 0; i < p->num_bad_objects; i++)
if (!hashcmp(sha1, p->bad_object_sha1 + 20 * i))
return p;
@@ -1853,14 +1854,14 @@ int find_pack_entry(const unsigned char *sha1, struct pack_entry *e)
struct list_head *pos;
prepare_packed_git();
- if (!the_repository->objects.packed_git)
+ if (!the_repository->objects->packed_git)
return 0;
- list_for_each(pos, &the_repository->objects.packed_git_mru) {
+ list_for_each(pos, &the_repository->objects->packed_git_mru) {
struct packed_git *p = list_entry(pos, struct packed_git, mru);
if (fill_pack_entry(sha1, e, p)) {
list_move(&p->mru,
- &the_repository->objects.packed_git_mru);
+ &the_repository->objects->packed_git_mru);
return 1;
}
}
@@ -1907,7 +1908,7 @@ int for_each_packed_object(each_packed_object_fn cb, void *data, unsigned flags)
int pack_errors = 0;
prepare_packed_git();
- for (p = the_repository->objects.packed_git; p; p = p->next) {
+ for (p = the_repository->objects->packed_git; p; p = p->next) {
if ((flags & FOR_EACH_OBJECT_LOCAL_ONLY) && !p->pack_local)
continue;
if ((flags & FOR_EACH_OBJECT_PROMISOR_ONLY) &&
@@ -1938,7 +1939,7 @@ static int add_promisor_object(const struct object_id *oid,
/*
* If this is a tree, commit, or tag, the objects it refers
- * to are also promisor objects. (Blobs refer to no objects.)
+ * to are also promisor objects-> (Blobs refer to no objects->)
*/
if (obj->type == OBJ_TREE) {
struct tree *tree = (struct tree *)obj;
diff --git a/path.c b/path.c
index 81a42d9115..3308b7b958 100644
--- a/path.c
+++ b/path.c
@@ -10,6 +10,7 @@
#include "submodule-config.h"
#include "path.h"
#include "packfile.h"
+#include "object-store.h"
static int get_st_mode_bits(const char *path, int *mode)
{
@@ -382,7 +383,7 @@ static void adjust_git_path(const struct repository *repo,
strbuf_splice(buf, 0, buf->len,
repo->index_file, strlen(repo->index_file));
else if (dir_prefix(base, "objects"))
- replace_dir(buf, git_dir_len + 7, repo->objects.objectdir);
+ replace_dir(buf, git_dir_len + 7, repo->objects->objectdir);
else if (git_hooks_path && dir_prefix(base, "hooks"))
replace_dir(buf, git_dir_len + 5, git_hooks_path);
else if (repo->different_commondir)
diff --git a/reachable.c b/reachable.c
index 88d7d679da..25cfd99d1c 100644
--- a/reachable.c
+++ b/reachable.c
@@ -11,6 +11,7 @@
#include "list-objects.h"
#include "packfile.h"
#include "worktree.h"
+#include "object-store.h"
struct connectivity_progress {
struct progress *progress;
diff --git a/repository.c b/repository.c
index 34c0a7f180..a4848c1bd0 100644
--- a/repository.c
+++ b/repository.c
@@ -13,7 +13,7 @@ void initialize_the_repository(void)
the_repository = &the_repo;
the_repo.index = &the_index;
- raw_object_store_init(&the_repo.objects);
+ the_repo.objects = raw_object_store_new();
repo_set_hash_algo(&the_repo, GIT_HASH_SHA1);
}
@@ -60,10 +60,10 @@ void repo_set_gitdir(struct repository *repo,
free(old_gitdir);
repo_set_commondir(repo, o->commondir);
- expand_base_dir(&repo->objects.objectdir, o->object_dir,
+ expand_base_dir(&repo->objects->objectdir, o->object_dir,
repo->commondir, "objects");
- free(repo->objects.alternate_db);
- repo->objects.alternate_db = xstrdup_or_null(o->alternate_db);
+ free(repo->objects->alternate_db);
+ repo->objects->alternate_db = xstrdup_or_null(o->alternate_db);
expand_base_dir(&repo->graft_file, o->graft_file,
repo->commondir, "info/grafts");
expand_base_dir(&repo->index_file, o->index_file,
@@ -142,7 +142,7 @@ static int repo_init(struct repository *repo,
struct repository_format format;
memset(repo, 0, sizeof(*repo));
- raw_object_store_init(&repo->objects);
+ repo->objects = raw_object_store_new();
if (repo_init_gitdir(repo, gitdir))
goto error;
@@ -223,7 +223,8 @@ void repo_clear(struct repository *repo)
FREE_AND_NULL(repo->worktree);
FREE_AND_NULL(repo->submodule_prefix);
- raw_object_store_clear(&repo->objects);
+ raw_object_store_clear(repo->objects);
+ FREE_AND_NULL(repo->objects);
if (repo->config) {
git_configset_clear(repo->config);
diff --git a/repository.h b/repository.h
index 6c383c05c6..abba2c09bc 100644
--- a/repository.h
+++ b/repository.h
@@ -1,12 +1,11 @@
#ifndef REPOSITORY_H
#define REPOSITORY_H
-#include "object-store.h"
-
struct config_set;
+struct git_hash_algo;
struct index_state;
+struct raw_object_store;
struct submodule_cache;
-struct git_hash_algo;
struct repository {
/* Environment */
@@ -25,7 +24,7 @@ struct repository {
/*
* Holds any information related to accessing the raw object content.
*/
- struct raw_object_store objects;
+ struct raw_object_store *objects;
/*
* Path to the repository's graft file.
diff --git a/server-info.c b/server-info.c
index 6fe64ede17..75a8b65e47 100644
--- a/server-info.c
+++ b/server-info.c
@@ -5,6 +5,7 @@
#include "commit.h"
#include "tag.h"
#include "packfile.h"
+#include "object-store.h"
/*
* Create the file "path" by writing to a temporary file and renaming
diff --git a/sha1_file.c b/sha1_file.c
index 7066d4c9ce..0989bbd948 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -23,7 +23,6 @@
#include "sha1-lookup.h"
#include "bulk-checkin.h"
#include "repository.h"
-#include "object-store.h"
#include "streaming.h"
#include "dir.h"
#include "list.h"
@@ -31,6 +30,7 @@
#include "quote.h"
#include "packfile.h"
#include "fetch-object.h"
+#include "object-store.h"
const unsigned char null_sha1[GIT_MAX_RAWSZ];
const struct object_id null_oid;
@@ -325,7 +325,7 @@ static void fill_sha1_path(struct strbuf *buf, const unsigned char *sha1)
void sha1_file_name(struct repository *r, struct strbuf *buf, const unsigned char *sha1)
{
- strbuf_addstr(buf, r->objects.objectdir);
+ strbuf_addstr(buf, r->objects->objectdir);
strbuf_addch(buf, '/');
fill_sha1_path(buf, sha1);
}
@@ -419,7 +419,7 @@ static int link_alt_odb_entry(struct repository *r, const char *entry,
while (pathbuf.len && pathbuf.buf[pathbuf.len - 1] == '/')
strbuf_setlen(&pathbuf, pathbuf.len - 1);
- if (!alt_odb_usable(&r->objects, &pathbuf, normalized_objdir)) {
+ if (!alt_odb_usable(r->objects, &pathbuf, normalized_objdir)) {
strbuf_release(&pathbuf);
return -1;
}
@@ -427,8 +427,8 @@ static int link_alt_odb_entry(struct repository *r, const char *entry,
ent = alloc_alt_odb(pathbuf.buf);
/* add the alternate entry */
- *r->objects.alt_odb_tail = ent;
- r->objects.alt_odb_tail = &(ent->next);
+ *r->objects->alt_odb_tail = ent;
+ r->objects->alt_odb_tail = &(ent->next);
ent->next = NULL;
/* recursively add alternates */
@@ -482,7 +482,7 @@ static void link_alt_odb_entries(struct repository *r, const char *alt,
return;
}
- strbuf_add_absolute_path(&objdirbuf, r->objects.objectdir);
+ strbuf_add_absolute_path(&objdirbuf, r->objects->objectdir);
if (strbuf_normalize_path(&objdirbuf) < 0)
die("unable to normalize object directory: %s",
objdirbuf.buf);
@@ -565,7 +565,7 @@ void add_to_alternates_file(const char *reference)
fprintf_or_die(out, "%s\n", reference);
if (commit_lock_file(&lock))
die_errno("unable to move new alternates file into place");
- if (the_repository->objects.alt_odb_tail)
+ if (the_repository->objects->alt_odb_tail)
link_alt_odb_entries(the_repository, reference,
'\n', NULL, 0);
}
@@ -665,7 +665,7 @@ int foreach_alt_odb(alt_odb_fn fn, void *cb)
int r = 0;
prepare_alt_odb(the_repository);
- for (ent = the_repository->objects.alt_odb_list; ent; ent = ent->next) {
+ for (ent = the_repository->objects->alt_odb_list; ent; ent = ent->next) {
r = fn(ent, cb);
if (r)
break;
@@ -675,13 +675,13 @@ int foreach_alt_odb(alt_odb_fn fn, void *cb)
void prepare_alt_odb(struct repository *r)
{
- if (r->objects.alt_odb_tail)
+ if (r->objects->alt_odb_tail)
return;
- r->objects.alt_odb_tail = &r->objects.alt_odb_list;
- link_alt_odb_entries(r, r->objects.alternate_db, PATH_SEP, NULL, 0);
+ r->objects->alt_odb_tail = &r->objects->alt_odb_list;
+ link_alt_odb_entries(r, r->objects->alternate_db, PATH_SEP, NULL, 0);
- read_info_alternates(r, r->objects.objectdir, 0);
+ read_info_alternates(r, r->objects->objectdir, 0);
}
/* Returns 1 if we have successfully freshened the file, 0 otherwise. */
@@ -722,7 +722,7 @@ static int check_and_freshen_nonlocal(const unsigned char *sha1, int freshen)
{
struct alternate_object_database *alt;
prepare_alt_odb(the_repository);
- for (alt = the_repository->objects.alt_odb_list; alt; alt = alt->next) {
+ for (alt = the_repository->objects->alt_odb_list; alt; alt = alt->next) {
const char *path = alt_sha1_path(alt, sha1);
if (check_and_freshen_file(path, freshen))
return 1;
@@ -882,7 +882,7 @@ static int stat_sha1_file(struct repository *r, const unsigned char *sha1,
prepare_alt_odb(r);
errno = ENOENT;
- for (alt = r->objects.alt_odb_list; alt; alt = alt->next) {
+ for (alt = r->objects->alt_odb_list; alt; alt = alt->next) {
*path = alt_sha1_path(alt, sha1);
if (!lstat(*path, st))
return 0;
@@ -913,7 +913,7 @@ static int open_sha1_file(struct repository *r,
most_interesting_errno = errno;
prepare_alt_odb(r);
- for (alt = r->objects.alt_odb_list; alt; alt = alt->next) {
+ for (alt = r->objects->alt_odb_list; alt; alt = alt->next) {
*path = alt_sha1_path(alt, sha1);
fd = git_open(*path);
if (fd >= 0)
diff --git a/sha1_name.c b/sha1_name.c
index 2065be90d2..4325f74e0c 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -10,6 +10,7 @@
#include "dir.h"
#include "sha1-array.h"
#include "packfile.h"
+#include "object-store.h"
#include "repository.h"
static int get_oid_oneline(const char *, struct object_id *, struct commit_list *);
@@ -105,7 +106,7 @@ static void find_short_object_filename(struct disambiguate_state *ds)
*/
fakeent = alloc_alt_odb(get_object_directory());
}
- fakeent->next = the_repository->objects.alt_odb_list;
+ fakeent->next = the_repository->objects->alt_odb_list;
for (alt = fakeent; alt && !ds->ambiguous; alt = alt->next) {
int pos;
diff --git a/submodule.c b/submodule.c
index 47ddc9b273..b03e5f5045 100644
--- a/submodule.c
+++ b/submodule.c
@@ -21,6 +21,7 @@
#include "remote.h"
#include "worktree.h"
#include "parse-options.h"
+#include "object-store.h"
static int config_update_recurse_submodules = RECURSE_SUBMODULES_OFF;
static struct string_list changed_submodule_names = STRING_LIST_INIT_DUP;
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index 7120634b04..7314b5943e 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "refs.h"
#include "worktree.h"
+#include "object-store.h"
static const char *notnull(const char *arg, const char *name)
{
diff --git a/tmp-objdir.c b/tmp-objdir.c
index b2d9280f10..fea3f55545 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -6,6 +6,7 @@
#include "strbuf.h"
#include "argv-array.h"
#include "quote.h"
+#include "object-store.h"
struct tmp_objdir {
struct strbuf path;
diff --git a/transport.c b/transport.c
index 00d48b5b56..3afc632472 100644
--- a/transport.c
+++ b/transport.c
@@ -18,6 +18,7 @@
#include "sha1-array.h"
#include "sigchain.h"
#include "transport-internal.h"
+#include "object-store.h"
static void set_upstreams(struct transport *transport, struct ref *refs,
int pretend)
--
2.17.0.rc0.348.gd5a49e0b6f
next prev parent reply other threads:[~2018-03-23 17:21 UTC|newest]
Thread overview: 135+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-03 2:54 [PATCH 00/11] Moving global state into the repository object (part 2) Duy Nguyen
2018-03-03 11:35 ` [PATCH 00/44] reroll nd/remove-ignore-env.. sb/object-store and sb/packfiles Nguyễn Thái Ngọc Duy
2018-03-03 11:35 ` [PATCH 01/44] repository: initialize the_repository in main() Nguyễn Thái Ngọc Duy
2018-03-21 21:46 ` Brandon Williams
2018-03-03 11:35 ` [PATCH 02/44] repository.c: move env-related setup code back to environment.c Nguyễn Thái Ngọc Duy
2018-03-19 18:07 ` Jonathan Tan
2018-03-19 18:56 ` Duy Nguyen
2018-03-21 21:53 ` Brandon Williams
2018-03-03 11:35 ` [PATCH 03/44] repository.c: delete dead functions Nguyễn Thái Ngọc Duy
2018-03-21 21:57 ` Brandon Williams
2018-03-03 11:35 ` [PATCH 04/44] sha1_file.c: move delayed getenv(altdb) back to setup_git_env() Nguyễn Thái Ngọc Duy
2018-03-21 21:59 ` Brandon Williams
2018-03-03 11:35 ` [PATCH 05/44] repository: delete ignore_env member Nguyễn Thái Ngọc Duy
2018-03-21 21:59 ` Brandon Williams
2018-03-03 11:35 ` [PATCH 06/44] repository: introduce raw object store field Nguyễn Thái Ngọc Duy
2018-03-04 2:19 ` Eric Sunshine
2018-03-21 22:04 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 07/44] object-store: migrate alternates struct and functions from cache.h Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 08/44] object-store: move alt_odb_list and alt_odb_tail to object store Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 09/44] object-store: free alt_odb_list Nguyễn Thái Ngọc Duy
2018-03-04 2:37 ` Eric Sunshine
2018-03-05 9:54 ` Duy Nguyen
2018-03-21 22:10 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 10/44] object-store: move packed_git and packed_git_mru to object store Nguyễn Thái Ngọc Duy
2018-03-19 19:39 ` Jonathan Tan
2018-03-23 16:57 ` Duy Nguyen
2018-03-21 22:18 ` Brandon Williams
2018-03-23 17:03 ` Duy Nguyen
2018-03-23 17:07 ` Duy Nguyen
2018-03-23 18:28 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 11/44] object-store: close all packs upon clearing the " Nguyễn Thái Ngọc Duy
2018-03-21 22:19 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 12/44] pack: move prepare_packed_git_run_once to " Nguyễn Thái Ngọc Duy
2018-03-21 22:25 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 13/44] pack: move approximate object count " Nguyễn Thái Ngọc Duy
2018-03-04 2:47 ` Eric Sunshine
2018-03-04 3:41 ` Duy Nguyen
2018-03-21 22:26 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 14/44] sha1_file: add raw_object_store argument to alt_odb_usable Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 15/44] sha1_file: add repository argument to link_alt_odb_entry Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 16/44] sha1_file: add repository argument to read_info_alternates Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 17/44] sha1_file: add repository argument to link_alt_odb_entries Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 18/44] sha1_file: add repository argument to prepare_alt_odb Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 19/44] sha1_file: allow link_alt_odb_entries to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-21 22:30 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 20/44] sha1_file: allow prepare_alt_odb " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 21/44] sha1_file: add repository argument to sha1_file_name Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 22/44] sha1_file: add repository argument to stat_sha1_file Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 23/44] sha1_file: add repository argument to open_sha1_file Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 24/44] sha1_file: add repository argument to map_sha1_file_1 Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 25/44] sha1_file: add repository argument to map_sha1_file Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 26/44] sha1_file: add repository argument to sha1_loose_object_info Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 27/44] sha1_file: allow sha1_file_name to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 28/44] sha1_file: allow stat_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 29/44] sha1_file: allow open_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 30/44] sha1_file: allow map_sha1_file_1 " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 31/44] sha1_file: allow map_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 32/44] sha1_file: allow sha1_loose_object_info " Nguyễn Thái Ngọc Duy
2018-03-21 22:34 ` Brandon Williams
2018-03-03 11:36 ` [PATCH 33/44] packfile: allow prepare_packed_git_mru " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 34/44] packfile: allow rearrange_packed_git " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 35/44] packfile: allow install_packed_git " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 36/44] packfile: add repository argument to prepare_packed_git_one Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 37/44] packfile: add repository argument to prepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-04 3:03 ` Eric Sunshine
2018-03-03 11:36 ` [PATCH 38/44] packfile: add repository argument to reprepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 39/44] packfile: allow prepare_packed_git_one to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-19 20:10 ` Jonathan Tan
2018-03-03 11:36 ` [PATCH 40/44] packfile: allow prepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-21 22:39 ` Brandon Williams
2018-03-22 1:47 ` Junio C Hamano
2018-03-03 11:36 ` [PATCH 41/44] packfile: allow reprepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 42/44] packfile: add repository argument to find_pack_entry Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 43/44] packfile: allow find_pack_entry to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-03 11:36 ` [PATCH 44/44] packfile: keep prepare_packed_git() private Nguyễn Thái Ngọc Duy
2018-03-19 20:34 ` Jonathan Tan
2018-03-21 22:42 ` Brandon Williams
2018-03-05 19:13 ` [PATCH 00/44] reroll nd/remove-ignore-env.. sb/object-store and sb/packfiles Junio C Hamano
2018-03-21 22:43 ` Brandon Williams
2018-03-23 15:55 ` [PATCH 0/1] nd/remove-ignore-env-field updates Nguyễn Thái Ngọc Duy
2018-03-23 15:55 ` [PATCH 1/1] repository.h: add comment and clarify repo_set_gitdir Nguyễn Thái Ngọc Duy
2018-03-26 21:04 ` Stefan Beller
2018-03-26 21:05 ` Stefan Beller
2018-03-23 17:20 ` Nguyễn Thái Ngọc Duy [this message]
2018-03-23 17:20 ` [PATCH 01/27] repository: introduce raw object store field Nguyễn Thái Ngọc Duy
2018-03-23 17:20 ` [PATCH 02/27] object-store: migrate alternates struct and functions from cache.h Nguyễn Thái Ngọc Duy
2018-03-23 17:20 ` [PATCH 03/27] object-store: move alt_odb_list and alt_odb_tail to object store Nguyễn Thái Ngọc Duy
2018-03-23 17:20 ` [PATCH 04/27] object-store: free alt_odb_list Nguyễn Thái Ngọc Duy
2018-03-23 18:43 ` Brandon Williams
2018-03-23 17:20 ` [PATCH 05/27] object-store: move packed_git and packed_git_mru to object store Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 06/27] object-store: close all packs upon clearing the " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 07/27] pack: move prepare_packed_git_run_once to " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 08/27] pack: move approximate object count " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 09/27] sha1_file: add raw_object_store argument to alt_odb_usable Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 10/27] sha1_file: add repository argument to link_alt_odb_entry Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 11/27] sha1_file: add repository argument to read_info_alternates Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 12/27] sha1_file: add repository argument to link_alt_odb_entries Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 13/27] sha1_file: add repository argument to prepare_alt_odb Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 14/27] sha1_file: allow link_alt_odb_entries to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 15/27] sha1_file: allow prepare_alt_odb " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 16/27] sha1_file: add repository argument to sha1_file_name Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 17/27] sha1_file: add repository argument to stat_sha1_file Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 18/27] sha1_file: add repository argument to open_sha1_file Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 19/27] sha1_file: add repository argument to map_sha1_file_1 Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 20/27] sha1_file: add repository argument to map_sha1_file Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 21/27] sha1_file: add repository argument to sha1_loose_object_info Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 22/27] sha1_file: allow sha1_file_name to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 23/27] sha1_file: allow stat_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 24/27] sha1_file: allow open_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 25/27] sha1_file: allow map_sha1_file_1 " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 26/27] sha1_file: allow map_sha1_file " Nguyễn Thái Ngọc Duy
2018-03-23 17:21 ` [PATCH 27/27] sha1_file: allow sha1_loose_object_info " Nguyễn Thái Ngọc Duy
2018-03-23 18:35 ` [PATCH 00/27] sb/object-store updates Brandon Williams
2018-03-23 18:50 ` Brandon Williams
2018-03-23 21:31 ` Junio C Hamano
2018-03-23 18:58 ` Duy Nguyen
2018-03-23 22:07 ` Eric Sunshine
2018-03-24 5:31 ` Duy Nguyen
2018-03-26 17:45 ` Stefan Beller
2018-03-26 18:09 ` Junio C Hamano
2018-03-26 19:27 ` Junio C Hamano
2018-03-23 17:45 ` [PATCH 00/12] sb/packfiles-in-repository updates Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 01/12] packfile: allow prepare_packed_git_mru to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 02/12] packfile: allow rearrange_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 03/12] packfile: allow install_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 04/12] packfile: add repository argument to prepare_packed_git_one Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 05/12] packfile: add repository argument to prepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 06/12] packfile: add repository argument to reprepare_packed_git Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 07/12] packfile: allow prepare_packed_git_one to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 08/12] packfile: allow prepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 09/12] packfile: allow reprepare_packed_git " Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 10/12] packfile: add repository argument to find_pack_entry Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 11/12] packfile: allow find_pack_entry to handle arbitrary repositories Nguyễn Thái Ngọc Duy
2018-03-23 17:45 ` [PATCH 12/12] packfile: keep prepare_packed_git() private Nguyễn Thái Ngọc Duy
2018-03-23 20:15 ` [PATCH 00/12] sb/packfiles-in-repository updates Brandon Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180323172121.17725-1-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jonathantanmy@google.com \
--cc=sbeller@google.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).