Merge branch 'jk/index-pack-maint'

"index-pack --strict" has been taught to make sure that it runs the
final object integrity checks after making the freshly indexed
packfile available to itself.

* jk/index-pack-maint:
  index-pack: correct install_packed_git() args
  index-pack: handle --strict checks of non-repo packs
  prepare_commit_graft: treat non-repository as a noop
This commit is contained in:
Junio C Hamano
2018-06-13 12:50:46 -07:00
4 changed files with 25 additions and 2 deletions

View File

@ -1482,8 +1482,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));