Merge branch 'jt/unparse-commit-upon-graft-change'

Updating the graft information invalidates the list of parents of
in-core commit objects that used to be in the graft file.

* jt/unparse-commit-upon-graft-change:
  commit,shallow: unparse commits if grafts changed
This commit is contained in:
Junio C Hamano
2022-06-13 15:53:42 -07:00
3 changed files with 34 additions and 1 deletions

View File

@ -97,6 +97,13 @@ int commit_shallow_file(struct repository *r, struct shallow_lock *lk)
{
int res = commit_lock_file(&lk->lock);
reset_repository_shallow(r);
/*
* Update in-memory data structures with the new shallow information,
* including unparsing all commits that now have grafts.
*/
is_repository_shallow(r);
return res;
}