Merge branch 'js/shallow-and-fetch-prune'
"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
This commit is contained in:
@ -550,6 +550,12 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
||||
if (!po_args.quiet && isatty(2))
|
||||
opts |= PRUNE_PACKED_VERBOSE;
|
||||
prune_packed_objects(opts);
|
||||
|
||||
if (!keep_unreachable &&
|
||||
(!(pack_everything & LOOSEN_UNREACHABLE) ||
|
||||
unpack_unreachable) &&
|
||||
is_repository_shallow(the_repository))
|
||||
prune_shallow(PRUNE_QUICK);
|
||||
}
|
||||
|
||||
if (!no_update_server_info)
|
||||
|
Reference in New Issue
Block a user