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-21 16:57:51 +0300
committerJunio C Hamano <gitster@pobox.com>2018-11-21 16:57:51 +0300
commitd0975a0724cc8f0f88931264b8b97c8a4c428dda (patch)
tree9f78eb6e4070aeddb1488315fbcac313811c98d4 /builtin
parent7d483e9c00516413a9c2dafc24a6ecb40975b02b (diff)
parent5dcfbf564c0f10869e568af4e05421f63b44fbbf (diff)
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/prune.c2
-rw-r--r--builtin/repack.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index 4916a4daa2..b29ce4abbc 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -161,7 +161,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
free(s);
if (is_repository_shallow(the_repository))
- prune_shallow(show_only);
+ prune_shallow(show_only ? PRUNE_SHOW_ONLY : 0);
return 0;
}
diff --git a/builtin/repack.c b/builtin/repack.c
index d5886039cc..3c30e16ec5 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -531,6 +531,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)