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>
This commit is contained in:

committed by
Junio C Hamano

parent
6a2df51c84
commit
19143f139d
@ -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);
|
||||
|
Reference in New Issue
Block a user