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:
Diffstat (limited to 'builtin-pack-refs.c')
-rw-r--r--builtin-pack-refs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c
index 6de7128b9d..3de9b3eefd 100644
--- a/builtin-pack-refs.c
+++ b/builtin-pack-refs.c
@@ -37,7 +37,9 @@ static int handle_one_ref(const char *path, const unsigned char *sha1,
if ((flags & REF_ISSYMREF))
return 0;
is_tag_ref = !strncmp(path, "refs/tags/", 10);
- if (!cb->all && !is_tag_ref)
+
+ /* ALWAYS pack refs that were already packed or are tags */
+ if (!cb->all && !is_tag_ref && !(flags & REF_ISPACKED))
return 0;
fprintf(cb->refs_file, "%s %s\n", sha1_to_hex(sha1), path);