diff options
| author | Stefan Beller <sbeller@google.com> | 2018-05-17 15:51:44 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-05-18 08:13:10 +0900 |
| commit | 19143f139d5a1a821d9d066da5d1c136a53ed803 (patch) | |
| tree | ab0d2e1bb32fd1ea44488f0347c157c8c723103e /builtin | |
| parent | shallow: add repository argument to set_alternate_shallow_file (diff) | |
| download | git-19143f139d5a1a821d9d066da5d1c136a53ed803.tar.gz git-19143f139d5a1a821d9d066da5d1c136a53ed803.zip | |
shallow: add repository argument to register_shallow
Add a repository argument to allow callers of register_shallow
to be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.
As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/pack-objects.c | 2 | ||||
| -rw-r--r-- | builtin/receive-pack.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index d65eb4a947..97a5963efb 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -2875,7 +2875,7 @@ static void get_object_list(int ac, const char **av) struct object_id oid; if (get_oid_hex(line + 10, &oid)) die("not an SHA-1 '%s'", line + 10); - register_shallow(&oid); + register_shallow(the_repository, &oid); use_bitmap_index = 0; continue; } diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 36906fd5e9..c666820b69 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -906,7 +906,7 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si) * not lose these new roots.. */ for (i = 0; i < extra.nr; i++) - register_shallow(&extra.oid[i]); + register_shallow(the_repository, &extra.oid[i]); si->shallow_ref[cmd->index] = 0; oid_array_clear(&extra); |
