Skip to content

Commit

Permalink
fetch-negotiator: add specific noop initializer
Browse files Browse the repository at this point in the history
Add a specific initializer for the noop fetch negotiator. This is
introduced to support allowing partial clones to skip commit negotiation
when performing a "refetch".

Signed-off-by: Robert Coup <robert@coup.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
rcoup authored and gitster committed Mar 28, 2022
1 parent dab1b79 commit 1836836
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fetch-negotiator.c
Expand Up @@ -23,3 +23,8 @@ void fetch_negotiator_init(struct repository *r,
return;
}
}

void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator)
{
noop_negotiator_init(negotiator);
}
8 changes: 8 additions & 0 deletions fetch-negotiator.h
Expand Up @@ -53,7 +53,15 @@ struct fetch_negotiator {
void *data;
};

/*
* Initialize a negotiator based on the repository settings.
*/
void fetch_negotiator_init(struct repository *r,
struct fetch_negotiator *negotiator);

/*
* Initialize a noop negotiator.
*/
void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator);

#endif

0 comments on commit 1836836

Please sign in to comment.