Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-06 09:50:18 +0300
committerJunio C Hamano <gitster@pobox.com>2018-11-06 09:50:18 +0300
commitea100b6dcba03053baed5a1e20c1a2644957b02e (patch)
tree9a1f02da22c743c835d3d5fc6cb678d61891992c /builtin/repack.c
parenta5ab66ee5f36fa3e90955f36f6451b3cf67943ed (diff)
parent5dcfbf564c0f10869e568af4e05421f63b44fbbf (diff)
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
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 0223f2880c..82c19b7555 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -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)