Re: [PATCH v3 09/28] shallow.c: extend setup_*_shallow() to accept extra shallow points
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:19
Nguyễn Thái Ngọc Duy [off-list ref] writes:
quoted hunk
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted> --- commit.h | 8 +++++--- fetch-pack.c | 5 +++-- shallow.c | 20 +++++++++++++++----- upload-pack.c | 2 +- 4 files changed, 24 insertions(+), 11 deletions(-)diff --git a/commit.h b/commit.h index e1fd587..3af4699 100644 --- a/commit.h +++ b/commit.h@@ -203,10 +203,12 @@ extern struct commit_list *get_shallow_commits(struct object_array *heads, int depth, int shallow_flag, int not_shallow_flag); extern void check_shallow_file_for_update(void); extern void set_alternate_shallow_file(const char *path); -extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol); +extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol, + const struct extra_have_objects *extra);
Confusing. Sounds as if you got the extra ".have" and storing them in the .git/shallow file (which of course would not make much sense), which is not what is going on. Also it is unclear how the sanity check the previous step seems to make and the new list of shallow commit names this patch adds to existing functions are designed to interact. I think the whole design needs a better explanation of the flow at the higher level.