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 /shallow.c | |
parent | 6a2df51c848c86e5620dcdf1a0ee2de637937b77 (diff) | |
download | git-19143f139d5a1a821d9d066da5d1c136a53ed803.tar.gz |
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 'shallow.c')
-rw-r--r-- | shallow.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ void set_alternate_shallow_file_the_repository(const char *path, int override) alternate_shallow_file = xstrdup_or_null(path); } -int register_shallow(const struct object_id *oid) +int register_shallow_the_repository(const struct object_id *oid) { struct commit_graft *graft = xmalloc(sizeof(struct commit_graft)); @@ -70,7 +70,7 @@ int is_repository_shallow(void) struct object_id oid; if (get_oid_hex(buf, &oid)) die("bad shallow line: %s", buf); - register_shallow(&oid); + register_shallow(the_repository, &oid); } fclose(fp); return is_shallow; |