Merge branch 'js/shallow-and-fetch-prune'
authorJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 06:50:18 +0000 (15:50 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Nov 2018 06:50:18 +0000 (15:50 +0900)
"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

1  2 
builtin/prune.c
builtin/repack.c
commit.h
shallow.c
diff --cc builtin/prune.c
Simple merge
Simple merge
diff --cc commit.h
index 6c4428c5931a9ab9d77d96a8a21aba4d75d73108,861a1593142e9c1816fc47c464143864c7bfbbab..8f15cfd43b602f0b85eda82fb9af90eef7996b6c
+++ b/commit.h
@@@ -251,9 -255,15 +251,11 @@@ 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 *);
 -int in_merge_bases(struct commit *, struct commit *);
 -int in_merge_bases_many(struct commit *, int, struct commit **);
 -
  extern int interactive_add(int argc, const char **argv, const char *prefix, int patch);
  extern int run_add_interactive(const char *revision, const char *patch_mode,
                               const struct pathspec *pathspec);
diff --cc shallow.c
Simple merge