diff options
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r-- | builtin/index-pack.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 7b2f7c0470..7b399478dd 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1480,8 +1480,12 @@ static void final(const char *final_pack_name, const char *curr_pack_name, } else chmod(final_index_name, 0444); - if (do_fsck_object) - add_packed_git(final_index_name, strlen(final_index_name), 0); + if (do_fsck_object) { + struct packed_git *p; + p = add_packed_git(final_index_name, strlen(final_index_name), 0); + if (p) + install_packed_git(the_repository, p); + } if (!from_stdin) { printf("%s\n", sha1_to_hex(hash)); |