From: Junio C Hamano Date: Wed, 21 Nov 2018 13:57:51 +0000 (+0900) Subject: Merge branch 'js/shallow-and-fetch-prune' into maint X-Git-Tag: v2.19.2~42 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d0975a0724cc8f0f88931264b8b97c8a4c428dda?hp=-c Merge branch 'js/shallow-and-fetch-prune' into maint "git repack" in a shallow clone did not correctly update the shallow points in the repository, leading to a repository that does not pass fsck. * js/shallow-and-fetch-prune: repack -ad: prune the list of shallow commits shallow: offer to prune only non-existing entries repack: point out a bug handling stale shallow info --- d0975a0724cc8f0f88931264b8b97c8a4c428dda diff --combined commit.h index 12b8b2d654,861a159314..dc5107259f --- a/commit.h +++ b/commit.h @@@ -202,7 -202,6 +202,7 @@@ typedef int (*each_commit_graft_fn)(con struct commit_graft *read_graft_line(struct strbuf *line); int register_commit_graft(struct repository *r, struct commit_graft *, int); +void prepare_commit_graft(struct repository *r); struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid); extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2); @@@ -256,7 -255,9 +256,9 @@@ extern void assign_shallow_commits_to_r uint32_t **used, int *ref_status); extern int delayed_reachability_test(struct shallow_info *si, int c); - extern void prune_shallow(int show_only); + #define PRUNE_SHOW_ONLY 1 + #define PRUNE_QUICK 2 + extern void prune_shallow(unsigned options); extern struct trace_key trace_shallow; int is_descendant_of(struct commit *, struct commit_list *); @@@ -323,7 -324,7 +325,7 @@@ extern const char *find_commit_header(c size_t *out_len); /* Find the end of the log message, the right place for a new trailer. */ -extern int ignore_non_trailer(const char *buf, size_t len); +extern size_t ignore_non_trailer(const char *buf, size_t len); typedef int (*each_mergetag_fn)(struct commit *commit, struct commit_extra_header *extra, void *cb_data);