Skip to content

Commit 1836836

Browse files
rcoupgitster
authored andcommitted
fetch-negotiator: add specific noop initializer
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dab1b79 commit 1836836

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

fetch-negotiator.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ void fetch_negotiator_init(struct repository *r,
2323
return;
2424
}
2525
}
26+
27+
void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator)
28+
{
29+
noop_negotiator_init(negotiator);
30+
}

fetch-negotiator.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ struct fetch_negotiator {
5353
void *data;
5454
};
5555

56+
/*
57+
* Initialize a negotiator based on the repository settings.
58+
*/
5659
void fetch_negotiator_init(struct repository *r,
5760
struct fetch_negotiator *negotiator);
5861

62+
/*
63+
* Initialize a noop negotiator.
64+
*/
65+
void fetch_negotiator_init_noop(struct fetch_negotiator *negotiator);
66+
5967
#endif

0 commit comments

Comments
 (0)